There is a function in the body of the document:
$(function() { $('.tab-selector').on('click', function() { $(this).addClass('selected'); var tab = $(this).data('tab'), forma = $('#fast_'+tab); $('#'+tab).show().siblings('div').hide(); go_fast_order(forma); } }) By clicking, the go_fast_order(forma) function is go_fast_order(forma) , into which I try to transfer an object. The function is in js plugin, here it is:
function go_fast_order(el){ var forma = $(el).serialize(), data = 'q=checkout_fast.php&', data = data + forma + "&action=yes"; $.ajax({ url : "ajax.php", dataType : "html", data : data, type : "GET", success : function(msg) { } });} A click occurs on the <li data-tab="one" class="tab-selector"> element. But serialize() does not work. Tried, so to declare the form var forma = el.serialize() , without result. If you directly specify the desired form id, for example #fast_one , it works without problems. Please tell me what my mistake is.
go_fast_order, or insideforma = $(el).serialize()? - AlexandrX