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.

$(document).ready(function(){     if ($('.back').is(":visible") == true)        $( "#bannerad" ).hide(); });
Rick Donato

Want to become a programming expert?

Here is our hand-picked selection of the best courses you can find online:
Python Zero to Hero course
Python Pro Bootcamp
Bash Scripting and Shell Programming course
Automate with Shell Scripting course
The Complete Web Development Bootcamp course
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial