I'm trying to change the text colour of the h2 title with id \[code\]ticketSearchTitle\[/code\] when the \[code\]ticketSearch\[/code\] div is hidden. But the piece of code I'm using to do that seems to break it entirely (i.e: no pointer icon on title, cannot hide div).Div structure:\[code\] <h2 id="ticketSearchTitle" >SEARCH</h2> <div id="ticketSearch"><div>\[/code\]Full code:\[code\]$("h2#ticketSearchTitle").css({'cursor':'pointer', 'display':'inline'}); $("h2#ticketSearchTitle").click(function(){ $("#ticketSearch").toggle('slow'); //change h2 text to show that is is inactive if ($("h2#ticketSearch").is(':hidden')){ $("#ticketSearchTitle").css('color','#D3D3D3') } });\[/code\]JQuery snippet that breaks the code:\[code\] //change h2 text to show that is inactive if $("h2#ticketSearch").is(':hidden'){ $("#ticketSearchTitle").css('color','#D3D3D3') }\[/code\]