Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8638747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:48:58+00:00 2026-06-12T10:48:58+00:00

Related question: Stop jQuery .data() from converting According to the documentation for .data() :

  • 0

Related question: Stop jQuery .data() from converting

According to the documentation for .data():

Every attempt is made to convert the string to a JavaScript value
(this includes booleans, numbers, objects, arrays, and null) otherwise
it is left as a string. To retrieve the value’s attribute as a string
without any attempt to convert it, use the attr() method

This is true for jQuery 1.7.2, but 1.8.2 does not do the conversion. Is this the new expected behavior?

For example, with the HTML <div data-code-name="007">Bond, James</div>

jQuery v1.7.2
$("div").data("codeName") returns 7
Example: http://jsfiddle.net/dMHS4/

jQuery v1.8.2
$("div").data("codeName") returns “007”
Example: http://jsfiddle.net/dMHS4/2/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:48:59+00:00Added an answer on June 12, 2026 at 10:48 am

    I think this answers your question

    http://bugs.jquery.com/ticket/7579

    They also have a test fiddle http://jsfiddle.net/dmethvin/8SsWK/

    And it shows that if converting to a number changed it from say 1.0 to 1, then it now is treated as a string, instead of a number. You can see this difference if you run there tests in 1.7.2 vs 1.8.2

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Related question, about assignment-initialization-declaration. $ javac MatchTest.java MatchTest.java:7: ')' expected for((int i=-1 && String
related to this question my script basically runs fine but sometimes it stop responding
I have a button made from a data controls 'CreateInsert' operation. I have set
A vaguely related question seems to be: Remove AddIn path from UDF in Excel
Related question [stackoverflow] here . I'm trying to do the above, but I want
This question is an extension of this Related question . Taking Derick's advice, I
I posted a related question to no response but here I'll be less narrow.
There is another possibly related question on this but it didn't have answers and
This is a related question to this but with EXISTS instead of IN SELECT
In a related question I asked how to get input via IUP . This

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.