I have several layers of photos, stacked on top of each other with different z-index #'s:
#layer1 {position: absolute; z-index:-1}
#layer2 {position: absolute; z-index:-2} and so on
There are corresponding menu items that when clicked, hide all photo layers and reveal its related layer of photos. I do this by setting the z-index of the photo layers behind the background image (I can't hide, because I need them to load and be ready to display) and have jquery change the z-index on click, then fadeIn.
When hovering over a menu item, I have a preview thumbnail appear, but after I click to reveal a layer, I don't want any of the preview thumbnails to show any longer.
I'm assuming I can use an if/else statement
This works on page load if ($("#layer1").css("z-index") < "0") {
however after you click to change the z-index, the if/else statement still thinks it's the old z-index. Here's a simple js fiddle of what I am talking about: http://jsfiddle.net/YktAZ/52/
Clicking on MENU 2 should trigger the else.
I hope this isn't confusing. Here is the actual website I am working on. Click on COVERS & SPREADS then hover or click on the new menu items that appear: URL