当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - How to apply parsley in a ajax loaded page

问题描述:

I need to apply validation for datepicker in a ajax loaded content. But validation is not working for the loaded content.Please help

/Script/

function get_period(feestype)

{

jQuery.ajax({

url:"../js/lib/datepicker/js/bootstrap-datepicker.js",

datatype:"script"

}).done(function(){

jQuery.ajax({

url:"../js/lib/parsley/parsley.min.js",

datatype:"script"

}).done(function(){

jQuery.ajax({

url:"../js/pages/form_validate.js",

datatype:"script"

}).done(function(){

$.ajax({

type: "GET",

url: "feesperiod.php",

data: "feestype="+feestype,

success: function(msg){

$("#period_div").html(msg).find('.datepicker').datepicker({ inline:true });

}

});

});

});

});

}

网友答案:

.done(function() You are not return anything, you can't use any function from bootstrap-datepicker.js, parsley.min.js

分享给朋友:
您可能感兴趣的文章:
随机阅读: