I have a button that when pressed hides a div using 'Display: None;'. How do I write in jquery to make the css property toggle between Display: None and Display: Block?
$('#help_btn').click(function(){ $('#help_box').css('display', 'none'); }); when you click it again
$('#help_box').css('display', 'block'); so on and so forth. Thanks!
edit:
My css would look like this
#help_box { display: block; } and my html is
<div id='help_box><p> Some helpful info!</p></div> <button id='help_btn>help?</button>
displaysettings using a CSS class and then using jQuery'stoggleClass(). Can we see your relevant HTML and CSS, as well?