KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have this working: <div data-people="australian">Australian people eats...</div> <script type="text/javascript"> alert($("[data-people=australian]").html()); </script> But this other doesn't work and I don't know how to solve: <div id="mich">Australian people eats...</div> <script type="text/javascript"> $("#mich").data("people", "australian"); alert($("[data-people=australian]").html()); </script> Why I can't set the data-* HTML5 attributes from jQuery and the use them to select a DOM object??? Lot of thanks
Tags (comma-separated)
Save Edits
Cancel