Is it possible to refer to an attribute of an element conditionally with Jquery?
What I’m after is something like:
$(".mylink":rel["2"]).show();
… which would “show the specific instance of .mylink element on the page that has rel=”2” HTML attribute on it. There would be multiple instances of .mylink on the page, each with its own “rel” value.
Thank you.
Like this:
If the “rel” value is a variable or something, you can do: