custom-data-attribute Questions

3

Solved

I'm trying to set some data on my buttons such that it can be accessed onclick. I'm having no problem using JSON in a button's data attribute where the key value is a string. However, I can't figur...
Teacup asked 11/10, 2012 at 8:42

1

Possible Duplicate: Get list of data-* attributes using javascript / jQuery I have a series of objects that all look similar to this: <a data-type="file" data-path="/some/path" da...
Meditate asked 3/9, 2012 at 14:29

2

Solved

I can use the jquery .data attribute and an alert confirms that it worked, but I don't see data attribute in page using firebug. $('#something').data('foo', 52); alert($('#something').data('foo')...
Hanover asked 27/3, 2012 at 16:1

4

Solved

Hi I am reading two numbers from html data-tags stored in a div. When I try to add the numbers together they are appended as strings. Is there anyways to include numbers in a data attribute and acc...
Gynecic asked 25/6, 2012 at 21:9

1

Solved

i want to fetch the value of data-attribute data-itemtype based on ul > li class = "activeTab" here is my code. <ul class="tabs"> <li data-itemtype="1" class="activeTab"><a hre...
Twilatwilight asked 20/4, 2012 at 13:30

2

Solved

I'm building an AJAX based portfolio module using pushState / hash bangs and as I'm ruling out browsers without JavaScript the only thing that concerns me is how limited the HTML custom data attrib...
Norvan asked 16/4, 2012 at 12:56

3

Solved

I was wondering if someone could help with with some jquery code for doing the following. I have a drop down select list input that i would like to filter a list of checkboxes. Here's what my html...
Twentyfourmo asked 23/1, 2012 at 16:16

1

Solved

I'm using this markup <label> Date <input type="text" data-datepicker="{maxDate: '+1d'}" /></label> <label> Another date <input type="text" data-datepicker="" /></...
Aesthesia asked 29/11, 2011 at 8:52

2

Solved

i have this html. <img src="2.png" alt="Pending" data-number="00991" data-status="0"> i am using the following jQuery to fetch the value. var number = $(this).find('img').data('number'); ...
Mcneese asked 1/11, 2011 at 4:27

2

Solved

is there a way in jQuery to select elements that have a certain value in a data attribute array? Consider this snippet of html: <li id="person1" data-city="Boston, New York, San Fransisco">...
Sheply asked 8/9, 2011 at 7:6

1

Solved

is there a way in jQuery to select elements that have a certain value in a data attribute array? Consider this snippet of html: <li id="person1" data-city="Boston, New York, San Fransisco">...
Dialogist asked 8/9, 2011 at 7:5

2

Solved

I have to choose between custom data tags or ids. I would like to choose custom data tags, but I want to be sure that they do not cause browser compatibility issues for the most widely used browser...
Fugal asked 3/6, 2011 at 2:17

2

Solved

In my project I am currently using some custom data-* attributes in my HTML to convey some extra data that will be used by jQuery. I found the .data() method and noticed that if I have a data-* att...
Trainor asked 3/5, 2011 at 6:17

1

Solved

I imagine this should be a pretty trivial task but using Firefox for Mac, 3.6.12 the following does not work: // assign data attributes $('.gallery li').each(function(i) { $(this).data('slide',i+...
Fermentation asked 16/11, 2010 at 20:3

2

Solved

I want to associate some custom data with some HTML nodes. I was going to use the new HTML5 style 'data-*' attributes. e.g.: <tr class="foo" data-typeid="7">…, and then I was going to select ...
Renitarenitent asked 18/10, 2010 at 9:26

1

Solved

I've started using the HTML5 data- attributes in my application, but when this is applied to an element that is a dijit widget, it disappears. <button dojoType="dijit.form.Button" data-id="5"&g...
Addison asked 16/6, 2010 at 13:36

2

Solved

So any custom data attribute that I use should start with "data-": <li class="user" data-name="John Resig" data-city="Boston" data-lang="js" data-food="Bacon"> <b>John says:</b&gt...
Hopehopeful asked 15/3, 2010 at 21:21

© 2022 - 2024 — McMap. All rights reserved.