[jQuery] Re: Metadata parameter as selector

2008-09-29 Thread Amardeep
as i m very new to jQuery i can't figure out what exactly ur code does .. but to be simple if u have an tr with id = ''my_tr the following code sould let u select the tr : $('#my_tr').css({do some thing}) On Mon, Sep 29, 2008 at 10:53 PM, me-and-jQuery [EMAIL PROTECTED]wrote: I am searching

[jQuery] Re: Metadata parameter as selector

2008-09-29 Thread ricardobeat
You can use the attribute filters: $('table tr[data*=id:4]') http://docs.jquery.com/Selectors - ricardo On Sep 29, 2:23 pm, me-and-jQuery [EMAIL PROTECTED] wrote: I am searching the web and documentation and still can't find a working solution. I have a table which rows has also id with

[jQuery] Re: Metadata parameter as selector

2008-09-29 Thread Erik Beeson
The previous responses don't seem to get that you're using the metadata plugin. I would suggest using filter: $('tr').filter(function() { return $(this).metadata().id == 4; })... If you find yourself doing that a lot, you can add a custom selector for metadata. Something like:

[jQuery] Re: Metadata parameter as selector

2008-09-29 Thread me-and-jQuery
Thanks ricardo, this one is tricky but it works. :) Amardeep, I was talking about querying parameters defined with metadata plugin, not classic DOM id. On Sep 29, 10:44 pm, ricardobeat [EMAIL PROTECTED] wrote: You can use the attribute filters: $('table tr[data*=id:4]')

[jQuery] Re: Metadata parameter as selector

2008-09-29 Thread me-and-jQuery
Erik, this is the solution I was looking for. Thanks also for making test page live. While we have there two solutions, I did a benchmark for both and here are the results, just for fun (1000x loop). :) Ricardo: 2406ms Erik: 2812ms (with filter) Thanks again to both of you. On Sep 30, 12:07