What about using the metadata plugin and storing data in the class
attribute?  A little hackish (in HTML5 can use the data attribute, which is
more proper...):

http://plugins.jquery.com/project/metadata

In addition to rel, you could also use the title attribute on the anchor,
no?

Scott

On Tue, Sep 22, 2009 at 4:47 PM, WalterGR <walte...@gmail.com> wrote:

>
> On Sep 22, 6:38 am, Liam Potter <radioactiv...@gmail.com> wrote:
> > or this
> >
> > <a href="#" rel="foobarbaz">show details</a>
> >
> > $("a").click(function(){
> >         var rel = $(this).attr('rel');
> >
> > }
> >
> > now you have passed foobarbaz to jquery.
>
> This works only if I don't already need to use "rel".
>
> I feel like there _must_ be a better way...  Certainly this attribute
> "abuse" isn't a jQuery best practice?
>
> Walter

Reply via email to