I want to go to the next step if the ajax call is successful, but i am not able to call the smart wizard methods inside the ajax call. My code is here.
var wizard = $("#listing_wizard").smartWizard({onLeaveStep:stepSubmit});
//stepsubmit
function stepSubmit(){
var that = this;
//that.goForward ------- working here
var step_no = this.curStepIdx+1;
var form_data = $("#step_"+step_no+"_form").serialize();
$.ajax({
type:'post',
url:"<?php echo URL_ADMIN ?>ajax.php",
data:form_data,
success:function(data){
return that.goForward; //not working here
}
});
}