skip to Main Content

Get data as object after form submit in jQuery

I am building a website that can send custom data after submission with the below code. $('form').submit((e)=>{ e.preventDefault(); let data = $('form').serializeArray(); console.log(data); $.ajax({ url: 'path/to/submit', type: 'POST', data: data, success: (res) => { console.log(res); } }) }); form {…

VIEW QUESTION

Html – jQuery trigger double on a button

I want to trigger a double click on a button when the dropdown changes. Single click works for me but I want double click. $('#fruitIds').change(function() { $("#btn-search").dblclick(); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <select name="fruits" id="fruitIds" style="width: 140px;"> <option selected="selected" value="">Days</option> <option value="5">5…

VIEW QUESTION
Back To Top
Search