Thanks Ralph.

I tried following

  alert($("input[name=bar]").val());

and rather then showing it's value it alert undefined ??? why?

I am sorry if this is very basic question.

On Sep 16, 4:11 pm, Ralph Whitbeck <ralph.whitb...@gmail.com> wrote:
> Take out the @ in your attribute selectors.  The @ was depricated in jQuery
> 1.2 and taken out in 1.3. So your new selectors will look like...
>
> 1. $("input[name=bar]")
>
> 2. $("p[class]")
>
> documentationhttp://docs.jquery.com/Selectors/attributeHas#attributehttp://docs.jquery.com/Selectors/attributeEquals#attributevalue
>
> Ralph
>
> On Wed, Sep 16, 2009 at 2:36 AM, pritisolanki <pritiatw...@gmail.com> wrote:
>
> > Hi,
>
> > I am a beginner in Jquery who simply set up the configs and start
> > exploring.please help me in following. I have starter kit html page.
>
> >        <form>
> >                Form 2
> >                <input name="bar" value="YYY" />
> >                <input />
> >        </form>
>
> > <p>
> > <p class="stuff">Okie this is hiding example </p>
> > </p>
>
> > In script tag following things do not take effects
> > 1. alert($("inp...@name=bar]").val()); - it suppose to alert the value
> > of this input.
> > 2. $("p...@class]").hide(); - My understanding is inner <p> tag should
> > get hide

Reply via email to