[jQuery] Re: Using data(name,value) to store additional information

2009-07-28 Thread Basdub
Thanks, that should do the trick. On Jul 23, 10:44 pm, Karl Swedberg k...@englishrules.com wrote: One way to retrieve them is to use the .filter() method with a   function. for example: $('div').filter(function() {    return $(this).data('foo') == 'bar'; }); --Karl Karl

[jQuery] Re: Using data(name,value) to store additional information

2009-07-28 Thread Eric Garside
You could also do it with non-styling classes, as an alternative to locating them. $('div:first').data('foo', 'bar').addClass('foo'); $('.foo'); On Jul 28, 3:15 pm, Basdub dube.sebast...@gmail.com wrote: Thanks, that should do the trick. On Jul 23, 10:44 pm, Karl Swedberg

[jQuery] Re: Using data(name,value) to store additional information

2009-07-23 Thread Karl Swedberg
One way to retrieve them is to use the .filter() method with a function. for example: $('div').filter(function() { return $(this).data('foo') == 'bar'; }); --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Jul 21, 2009, at 11:29 AM, Basdub wrote: I