JQuery - Hide id if Class is Visible

 In order to hide a class is a class is visable the following is used. Below will hide the div id #bannerad is the class .back is visible.

    if ($('.back').is(":visible") == true)
       $( "#bannerad" ).hide();

About the Author


R Donato

Rick Donato is the Founder and Chief Editor of He currently works as an SDN/NFV Solutions Architect and has a keen interest in automation and the cloud.

You can find Rick on Twitter @f3lix001