jQuery: The Write Less, Do More JavaScript Library

Possible bug in node.attr()

View: New views
2 Messages — Rating Filter:   Alert me  

Possible bug in node.attr()

by ml1-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Imagine I have a form that contains this:

    <input type="text" value="1" name="quantity" id="quantity"
size="4" class="myclass" />

The following query returns "1" as expected:

    $($('input[class="myclass"]')[0]).attr('value')

But if you surround the "1" value in brackets like so:

    <input type="text" value="[[1]]" name="quantity" id="quantity"
size="4" class="fmr2" />

The same query returns the empty string.  All the other attributes of
the input work fine with the same query, so I know the query is
correct.

Is this a bug?  Sadly I have a situation where a value needs to be
surrounded in double brackets like that, so I'd appreciate any ideas
for workarounds.

--

You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to jquery-dev@....
To unsubscribe from this group, send email to jquery-dev+unsubscribe@....
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.



Re: Possible bug in node.attr()

by ml1-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Uhmm, nevermind.

--

You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to jquery-dev@....
To unsubscribe from this group, send email to jquery-dev+unsubscribe@....
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en.