Not sure if I answer your question completly, but doing that test on
each elements tagName should do it

Tzury skrev:
> Say a user called $('div.foo') I would like to get this 'div.foo' from
> within my plug-in context.
>
> I look through the code and couldn't find a property which contain
> this data;
>
> I was thinking that 'query' is the appropriate name for this property
>
> example usage:
>
> $.fn.MyPlugIn = function (){
>     if (/table|thead|tbody|th|tr|td/.test($.query){
>         // do the table thing
>     }
>     else {
>        // do the chair thing ;-)
>     }
> }
>
> $('table').MyPlugIn();
> $('div').MyPlugIn

Reply via email to