javascript - How to hide a div whenever another div is displayed on the screen. -


i have helpsection displayed default. when user searches results, page reloads , searchresults should displayed section located , section set display:none.

i have jquery searches page , determines if helpsection on screen or not. if searchresults being displayed, helpsection should disappear.

i have tried various methods , none of them worked. appreciated.

like :

if($('#yourelement').is(':visible'))  {     $('#yourotherelement').hide(); } 

if want show instead, can use show(), :

$('#yourotherelement').show(); 

however, if determined on page load, smarter define using server-side language.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -