How can I change the attribute of an element, depending on another attribute?
For example, I have 2 <a> elements. They both have the class myClass. One of the elements has rel="1" and the other has rel="2". I wish to only change the z-index on the one which has rel=1. How do I do this?
I’ve tried:
$(".myClass[rel='1']").css("z-index", 10);
But it doesn’t work. Cheers.
try this:
and see if it disappears. Then you will know if it is your selector, or positioning.