My favorites | Sign in
Project Home Downloads Issues
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 558: Provide access to the <a> element in any of the callbacks
2 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


 
Reported by spurrymo...@gmail.com, Dec 15, 2010
I just wanted to access the anchor element that was clicked in the first place from a callback.

The reason for me is to set the title based on an attribute I've setup - as I do not want the same title as the anchor.

eg I have something like this:
<td data-title="the title I want for nyro dialog" <a title="description" href="someNyroLink.html" </td>

But I can't do this (you can see what I want, even though the code is obviously confused about the realities of closure/scope)

 return $('a').nyroModal({
      title: $(this).parent('td').attr('data-title'),
      ...
      }, });

nor can I do something like this:

 return $('a').nyroModal({      
      showBackground: function(elts, settings, callback) {
        settings.title = elts.THELINK.parent('td').attr('data-title')
      },
    });

Powered by Google Project Hosting