Jquery - toggle problem -
i have toggle function
$('#togglebtn').toggle(function() { $('#panel').show(); }, function() { $('#panel').hide(); });
i have button close/hide panel
$('#otherbtn').click(function() { $('#panel').hide(); });
all trying when hide panel #otherbtn
event still active on #togglebtn
, gives me click start toggle panel again. how can fix that?
trigger click event on toggle button.
$('#otherbtn').click(function() { $('#panel').hide(); $('#togglebtn').click(); //resets tooglebtn state });
Comments
Post a Comment