custom-data-attribute Questions

5

Solved

I'm searching for this sometime. Found this old article and this. But not working for me. My Problem is : I cannot set incremented data-id to HTML Element via jQuery. I'm able to alert the same, B...
Pitsaw asked 7/1, 2014 at 12:44

2

Solved

I have a rails form that has this code: <%= form_tag("../vehicles", method: "get") do %> <div> <div> <%= label_tag(:address, t("ui.reservations.pick...
Sarsenet asked 27/12, 2013 at 15:47

1

Solved

var max = this.collection.max(function(player) { return player.get('points'); }); I spent a few hours playing with backbone.js trying to figure out how to check if my max model changes, it...
Decrement asked 24/12, 2013 at 13:12

2

I need to assign a static data- attribute to an Ember.View, how do I set that in the View object instead of in the {{view }} tag. App.MessagesFormView = Ember.View.extend({ tagName: 'div', class...
Cozza asked 19/4, 2013 at 23:42

1

Solved

Well it must be late and my brain got numb. How come jQuery doesn't recognize case sensitive in data attribute? I faced this annoying problem: HTML: <a data-showId="12345">Test 1</a> ...
Fichtean asked 29/10, 2013 at 8:35

3

Solved

I am setting a data-position attribute on document ready via jQuery on several divs. The setting definitely works. For example, calling the below code in the Chrome console is returning 'left'. $(...
Sense asked 15/10, 2013 at 10:39

2

Solved

Say I'm looking for all elements with an attribute 'data-language', whose value begins with 'java' (would match both 'java' and 'javascript'). I know how to do this: $('[data-language^="java"]') ...

2

Solved

How can I set custom data- attribute on the {{#linkTo}} helper? I want use this: {{#linkTo "foo" data-toggle="dropdown"}}foo{{/linkTo}} and the result should look like this: <a id="ember323"...
Lotic asked 23/8, 2013 at 10:7

1

Solved

I have a custom data-attribute set by default: data-equipment="0" If i change it with jquery using .data() $(this).data("equipment", 10) and then use the getAttribute() this.getAttribute("dat...
Colettacolette asked 7/8, 2013 at 15:14

4

Solved

I have 16 different section-tags. Every section-tag has a data- attribute to set a specific background-color for each section: <section data-color="#A3D1B5"> Now I want to set this...
Doherty asked 8/7, 2013 at 9:48

3

Solved

I've been seeing these attributes around on more modern websites like GitHub and such, and they always seemed to coincide with a customized popover like the title attribute. <a href="/" data-va...
Augment asked 22/6, 2013 at 1:33

2

Solved

Does anyone know how the HTML5 data attributes (data-*) can be implemented in XHTML without rendering the markup as invalid? Is there a custom namespacing hack that would allow this on existing HT...
Kusin asked 19/7, 2010 at 23:30

2

Solved

I want to use a custom boolean attribute to mark an element's contents as editable. I'm aware of the data-* attributes, but wasn't sure if they require a value. I don't need data-is_editable=...
Turkestan asked 31/5, 2013 at 20:0

2

Solved

I'm trying to create a form with some custom data attributes on the inputs: <input type="text" data-family="Dinosaurs"> This seemed like a nice clean way to have easy front-end access (hah...
Sacha asked 4/3, 2011 at 23:6

3

I am trying to add a HTML 5 data attribute into the DOM. I have seen on the jQuery site the format for data attributes is: $('.pane-field-related-pages ul').data("role") === "listview"; But this...
Intrench asked 10/5, 2011 at 12:5

6

Solved

I came across 3 ways to store any data with HTMLElement object. Can someone please suggest the best practice to associate any data with element object? I prefer number 3 because it doesn't set an...
Piecemeal asked 2/4, 2013 at 13:47

3

Solved

Lately, I'm facing problems with HTML custom data attributes in my rails application. I user the following pattern in order to add some data attributes to the html tags and use them later in my jav...
Bolanos asked 5/3, 2013 at 16:27

4

Solved

I'm generating a list of checkboxes for a single collection like so: = f.input :parts, as:check_boxes, collection: @parts_list I want some checkboxes in the collection to disappear/reappear depe...
Abiogenetic asked 8/2, 2013 at 20:37

1

Solved

We have this 'strange' situation where some product codes, for example 11E6, which are stored in data attributes (ex data-prodcode) are getting converted to 11000000, when retrieved inside jquery c...
Ludvig asked 18/2, 2013 at 16:24

3

I have a list of books and I want to store data against each book e.g. Price, Quantity, id, catergory id, size, weight etc. I was looking at storing all this in the dom by extending the li element...
Shirtmaker asked 13/1, 2013 at 21:9

3

Solved

With all the respect to Html5 data attribute When I have a code like this: <li class="user" data-name="Royi Namir" data-city="Boston" data-lang="js" data-food="Bacon"> </li> I'm a...
Plow asked 4/1, 2013 at 10:30

1

Solved

Can custom data-attributes set on an iframe be accessed by the iframe's content? Example: <iframe src="foo.html" data-something="123"></iframe> Is there a way to access data-somethi...
Consolute asked 26/11, 2012 at 18:16

4

Solved

I'm having some trouble with data-attributes, I can't get anything to work for some reason so I must be doing something wrong: Set: $('#element').data('data1', '1'); //Actually in my case the dat...
Estipulate asked 7/11, 2012 at 18:25

6

Solved

I have just started considering using the HTML 5 api for a Rails/JQuery project, so I can use that great data- attribute to store values. I am worried though about browser compatibility issues. I ...

1

Solved

I have the current html: <input id="dynamic1" /* other */ data-group-animal="y1,y2" /> <input id="dynamic2" /* other */ data-group-vegetable="y3,y4" /> These are independent divs tha...
Glaudia asked 12/10, 2012 at 15:32

© 2022 - 2024 — McMap. All rights reserved.