I have a jquery timer that got loaded for each record with ajax on click by user. it works fine one time, if another record is clicked and timer is loaded again with ajax events from first timer and buttons are replaced with new timer, so if i click on first timer second timer got effected. this code is loadded with ajax in timer div every time so i each time unique id and jobprocessId is passed
var id = '<?php echo $jId;?>';
var jobprocessId='<?php echo $jobprocessId; ?>';
jQuery('#pauseButton'+jobprocessId+id+'').toggle(function() {
jQuery('#pauseButton'+jobprocessId+id+'').hide();
jQuery('#updateTimer'+jobprocessId+id+'').show();
},
function() {
jQuery('#pauseButton'+jobprocessId+id+'').hide();
jQuery('#updateTimer'+jobprocessId+id+'').show();
}
);
if i开发者_开发知识库 need to explain in other words please let me know.
i am using this Jquery Timer
Am not sure I follow your question, however looking at the code passing wrong type of parameters to the toggle function. As per jquery site, toggle takes the parameters
[ duration ], [ easing ], [ callback ] where
durationA string or number determining how long the animation will run.
easingA string indicating which easing function to use for the transition.
callbackA function to call once the animation is complete.
You are passing two function parameters. Can you check...
精彩评论