JQuery hide Class if other class is visible or shown
Found similar questions but nothing that covers exactly what I need. I kept it simple in my example and I want to use JQuery.
I have two classes. I want to hide the "filter" div if the "category" div is shown on page load. There are currently NO styles associated with either class. I believe I am pretty close but it doesn't work.
Thanks in advance!
Use .length to test if an element is present.
Use .hide() & .show() to show and hide elements.
And finally, you want the code to run only when the page has finished loading, so you want to wrap it all in $(document).ready().
So something like this should work best: