skip to Main Content

submit 2 form data in single submit using jquery ajax

i want to submit 2 from data in single submit button. <form id="form1"> <input type="text" name="name"> <input type="submit" value="Submit"> </form> <form id="form2"> <input type="email" name="email"> <input type="submit" value="Submit"> </form> What i use for signle form: $.ajax({ url: '/submit_form_data.php', type: 'POST',…

VIEW QUESTION

Swap image on tab selected jQuery

How can I simplify this into one single function: $("#tab-one").click(function() { var imageUrl = "img/img-1.png"; $(".masthead.product-detail").css("background-image", "url(" + imageUrl + ")"); }); $("#tab-two").click(function() { var imageUrl = "img/img-2.png"; $(".masthead.product-detail").css("background-image", "url(" + imageUrl + ")"); }); $("#tab-three").click(function() { var imageUrl =…

VIEW QUESTION
Back To Top
Search