Skip to main content

Bug Tracker

Side navigation

#10249 closed bug (wontfix)

Opened September 11, 2011 12:09PM UTC

Closed September 11, 2011 01:06PM UTC


Reported by: Owned by:
Priority: low Milestone: None
Component: attributes Version: 1.6.3
Keywords: Cc:
Blocked by: Blocking:

<div id="ctabs">


<li value="ctab1" class="active">Закладка</li>

<li value="ctab2">Закладка2</li>



$("#ctabs ul li").click(function(){

v = $(this).attr('value');

//v = 0; ???


return only if value="(integer)". it work normally?

Attachments (0)
Change History (2)

Changed September 11, 2011 01:06PM UTC by timmywil comment:1

component: unfiledattributes
owner: →
priority: undecidedlow
status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.

Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: Open the link and click to "Fork" (in the top menu) to get started.

Keep in mind that the value attribute on an li is only valid(although deprecated) if used for a certain reason:

This is why you are getting the values you are getting. It is default browser behavior.

However, to retrieve the value attribute instead of the property (which is being retrieved with .attr() for backwards compatbility reasons), use the raw function .getAttribute():

Changed September 11, 2011 01:06PM UTC by timmywil comment:2

resolution: → wontfix
status: pendingclosed

Sorry, no need to make a test case. Force of habit.