Basically I am trying to get some jQuery code to work with elements I bring in through Ajax:
$(document).ready(function() {
$( #newsevents ).DDSlider({
nextSlide: .slider_arrow_right ,
prevSlide: .slider_arrow_left ,
selector: .slider_selector ,
trans: fading
});
});
问题在于,我不知道如何使用<代码>.live(),以便使新引入的内容与上述文字一致。
I tried
$( #weekly_events_m ).live( click , function(event) {
event.preventDefault();
console.log( clicked );
$.get( index.php/weekly_events , function(html) {
$( #ajax ).css( display , none ).html(html).fadeIn(3000).css( display , inline );
success(function() {
$( #newsevents ).DDSlider({
nextSlide: .slider_arrow_right ,
prevSlide: .slider_arrow_left ,
selector: .slider_selector ,
trans: fading
});
});
});
});
并且仍然没有工作。 我做了什么错误?