0

Im using jquery tools overlay to display overlays when I click on a link. I have 3 different overlays on the page. The rel attribute of the link is set to the name/id of the overlay.

<a href="http://www.example.com" rel="#custom">click to open overlay</a>

The overlay is below :

<div class="email_overlay" id="custom"> <div class="emailWrap"></div> </div>

The overlay is initialised below

$("a[rel]").overlay();

The problem is that I have several other links on the page that have rel="nofollow" on them.

This is causing errors as it is thinks the nofollow's are overlays.

What is the best work around for this?

user1052096
  • 853
  • 4
  • 13
  • 23

1 Answers1

2

Maybe:

$("a[rel^='#']").overlay();

It means - select all a tags with rel attribute starts with #

hamczu
  • 1,774
  • 12
  • 14