[英]How to implement jQuery on Event with Jquery Plugin Elements
I want to implement jquery plugin element on Ajax Sucess request. 我想在Ajax Sucess请求上实现jquery插件元素。
like 喜欢
$(document).on('click','.someclass',function() {
//my code
});
But now i have some functions 但是现在我有一些功能
$('.nailthumb-container').nailthumb({width: 223, height: 147});
and 和
$("div.recent_articles").smoothDivScroll({
autoScrollingMode: "onStart"
});
How to implement on event on Above Functions 如何在上述功能上实现事件
Try this: 尝试这个:
$.ajax({
url:"some_url",
success:function(data) {
$(document).on('click','.someclass',function() {
// my code
});
}
});
Best read the docs: http://api.jquery.com/jquery.ajax/ 最好阅读文档: http : //api.jquery.com/jquery.ajax/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.