Guest mangal Posted March 9, 2009 Report Share Posted March 9, 2009 (edited) i m trying to hide previous div and display next div but its not work in firefox function toggle(){ var div1 = window.document.getElementById('div1') if (div1.style.display = 'none' ) { div1.style.display = 'block' div2.style.display = 'none' div3.style.display = 'none' } else { div1.style.display = 'block' } } Palash Bose Edited March 9, 2009 by mangal Quote Link to comment Share on other sites More sharing options...
tpattison Posted March 9, 2009 Report Share Posted March 9, 2009 Both the if and the else statements contain div1.style.display = 'block'. The second one should be div1.style.display = 'none'. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.