I want to pass the variables name, email into the .load() event.
var email = $('#reg-email').val();
var name = $('#reg-name').val();
$("#user-detail").load("proc/reg-step2.php",{ "name": "name" , "email": "email" }, function() {
$("#ajaxLoader2").remove();
});
What should be the syntax for this section so that the variable is passed instead of jst the strings I’ve written here { "name": "name" , "email": "email" }??
You can use a variable instead of a literal:
{ "name": name, "email": email }