This is also one good way to get the type of the control. But is there
any generic function that I can extend with jQuery in which I pass the
control id and it returns me the type of the control whether it be
div, span, select, textarea etc etc.

On Dec 8, 4:00 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote:
> Another option would be to use the .is() method in combination with jQuery
> form (pseudo-)selectors like "select" "textarea" ":radio" ":checkbox"
> ":hidden" See
>
> http://docs.jquery.com/Selectors
>
> the "Forms:" section for a list of the form pseudo-selectors.
>
> - Richard
>
> On Mon, Dec 8, 2008 at 5:34 AM, JQueryProgrammer <[EMAIL PROTECTED]>wrote:
>
>
>
> > Thanks for the help.
>
> > On Dec 8, 3:28 pm, Kayhadrin <[EMAIL PROTECTED]> wrote:
> > > If you try $("#mycontrolid").attr('type'), you should find the type of
> > > INPUT tag you have.
>
> > > On Dec 8, 9:05 pm, JQueryProgrammer <[EMAIL PROTECTED]> wrote:
>
> > > > How can I check what is the type of control. eg.
>
> > > > In javascript document.getElementById("mycontrolid").type will return
> > > > select-one, textbox, checkbox, radio etc.
>
> > > > How can I find it in jQuery. I tried as
>
> > > > $("#mycontrolid").constructor but it returns as Object in all cases.

Reply via email to