Monday, September 29, 2008

[jQuery] Re: Metadata parameter as selector

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 <ricardob...@gmail.com> wrote:
> 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 <brilko.bri...@gmail.com> 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 metadata, for example <tr
> > data="{id:4}">
>
> > And now I want to select row with id 4. I was trying many ways but no
> > success for now. For example:
>
> > $.metadata.setType("attr", "data")
> > $("table tr.id:4").metadata().remove();
>
> > Anyway, is this possible with metadata at all? Thanks for any help.

No comments: