how to stop toggle from taking place automatically

2019-08-31 02:46发布

based on the answer received for my previous question i modified my code from

this

$(document).ready(function () {
$(".edit-comment-mine").click(function () {
    var comm_id=$(this).attr('rel');
    $("#comment_update_cont"+comm_id).toggle();
});
});

to this

$(document).on('click','.edit-comment-mine',function() {
    var comm_id=$(this).attr('rel');
    $("#comment_update_cont"+comm_id).toggle('fast');
});

and it works but there is a problem again the div toggles on and then soon off without me clicking it again.So how do i stop it from doing that

0条回答
登录 后发表回答