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

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -