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 8021637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:02:37+00:00 2026-06-04T22:02:37+00:00

I was looking at this stackoverflow question how to get data attributes of dynamically

  • 0

I was looking at this stackoverflow question
how to get data attributes of dynamically generated element

which led me to this fiddle – http://jsfiddle.net/Mk2zy/

But for some reason – it wasn’t working on my code. Then I checked the Jquery version – and the fiddle uses 1.5.2 – So on the fiddle if I update the jquery version to anything above 1.5.2 – it doesn’t return the value anymore – it returns undefined.

Am I missing something simple here
Thanks for looking in

  • 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-04T22:02:40+00:00Added an answer on June 4, 2026 at 10:02 pm

    Use data-contentid (in the jQuery script only, see below), all lowercase, as defined by the W3 specification. The jQuery developers may have overlooked that requirement and resolved it for later versions.

    Note: All attributes on HTML elements in HTML documents get
    ASCII-lowercased automatically, so the restriction on ASCII uppercase
    letters doesn’t affect such documents.

    The above statement translates to: If there are uppercase letters in data-* attributes, they are automatically changed to lowercase, in the HTML, not scripts. This is why $('data-contentId') is undefined, because data-contentId in the HTML was changed to data-contentid.

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

Sidebar

Related Questions

I just finished looking at this question: https://stackoverflow.com/questions/753122/which-cloud-computing-platform-should-i-choose But, I am not certain what
Looking in this StackOverflow question it uses the following to send emails: System.Net.Mail.SmtpClient Is
I found this question https://stackoverflow.com/questions/4612563/get-push-notification-from-twitter-on-status-updates , but there was no answer. I'm looking to
I was just looking at this stackoverflow question: Display web browser settings And that
I want to get a URL scheme exact like SO's question URL. Like http://stackoverflow.com/questions/6035363/so-like-url-with-mod-rewrite
I've been looking at this Stackoverflow question and have the answer implemented. It works
Looking through StackOverflow this question seems to be asked a lot, but I have
looking at this example of the jquery ui slider http://jqueryui.com/demos/slider/#steps i want to be
Im looking at this implementation of DCT using cuda: http://www.cse.nd.edu/courses/cse60881/www/source_code/dct8x8/dct8x8_kernel1.cu The part in question
I was looking at this post by Jeremy Hodge http://xpagesblog.com/XPagesHome.nsf/Entry.xsp?documentId=88065536729EA065852578CB0066ADEC With Event handlers and

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.