I've no idea how to write this but what I'm after is;
If .sub1 is :visible, .Homepage fadeTo 0.25
If the Sub1 div is visible, then I want this to make the .homepage div opacity to 0.25
I have this;
- $("#cat").click(function(){
- if ($('.sub1').css('opacity') == .25) {
- $('.homepage').fadeTo(500, 100);
- } else {
- $('.homepage').fadeTo(500, .25);
- }
- });
but its not bringing the .homepage back to 100% opacity