custom-data-attribute Questions
5
Solved
In my html I have a span element:
<span class="field" data-fullText="This is a span element">This is a</span>
And I want to get the data-fullText attribute. I tried these two ways, b...
Foreshow asked 11/5, 2014 at 11:30
1
Solved
i'm trying to use inline data-attributes as variables for css...
is there any known option to get this run:
.mycss-class {text-shadow: attr(data-textshadow); }
<div class="mycss-class" da...
Alumroot asked 20/9, 2017 at 13:16
2
Is there a limit on html's data-attribute? Is it possible to have many data-attributes on a tag?
ex. data-a="" data-b="" data-c="" ... data-z=""
And also is there a limit how long the value on ea...
Ishtar asked 11/9, 2014 at 16:42
2
I am adding div to the DOM as below,
React.createElement("div", { className: "test"});
The rendered html should be as below
<div class="test" data-test>
</div>
Where can I add data...
Ravo asked 14/4, 2017 at 11:11
5
I have two elements with the following setup:
<span data-placeholder-class="test-class"></span>
<span data-placeholder-template="/some/template.hbs"></span>
I'm using und...
Floaty asked 24/10, 2016 at 10:10
3
Is it possible to find an element that has a data attribute with the same name of an element's id in the DOM? (Is it a bad practice to give a data attribute the same value as an id?)
Example synta...
Dalliance asked 11/4, 2017 at 1:37
2
I'm trying to make a custom data attributes on my website in lightbox. I just made it for one element in Javascript and it works fine but I want to make it works in multiple elements.
How it work...
Reverence asked 30/12, 2015 at 13:41
4
Solved
My goal is to add some jQuery to a project that will check to see if an element has a data-attribute without a value. For instance, with the video tag you can just add autoplay without a value and ...
Empanel asked 23/2, 2017 at 22:51
2
Solved
This works for the first match:
var attributeValue = $({selector}).data("myAttribute");
But if I want to get values for all elements selector matches, I do the following:
var attributes = [];
...
Demolish asked 15/5, 2013 at 5:55
2
Solved
In PHP, I use json_encode() to echo arrays in HTML5 data attributes.
As JSON requires - and json_encode() generates - values encapsulated by double quotes. I therefor wrap my data attributes with s...
Osyth asked 12/1, 2012 at 9:16
3
Solved
I need to retrieve the value of data-url attribute from event.relatedTarget
I tried in many ways:
e.relatedTarget.data('url')
e.relatedTarget.attr('url')
e.relatedTarget.prop('url')
but it alwa...
Internment asked 21/10, 2016 at 9:39
2
Problem:
I am using JQuery DataTables v1.10 for a work-related project.
The project requires a Datatable to be defined and created with parsed JSON data passed in as the values of the table
Once...
Hispania asked 14/9, 2014 at 3:35
2
Solved
I have a folder with a few background images (one.jpg, two.jpg, three.jpg) , and this markup
<section class="slide" data-bg="one"></section>
<section class="slide" data-bg="two">...
Abloom asked 20/6, 2012 at 10:47
3
Solved
I need to get the value of userid, data-attribute from a html table and put this value into a var, but I wanna to this action without click action.
<table id="tblList">
<tbody id="some...
Dejecta asked 2/9, 2016 at 8:59
5
Solved
I have some checkboxes which are used to show/hide columns and automatically resize them to fit the screen. I've linked the checkboxes to their relevent columns using a data attribute and try to re...
Airframe asked 16/2, 2015 at 10:16
4
Solved
I'd like to write a simple jQuery plugin that displays inline modals under specified elements. My idea is for the script to auto-init based on data attributes specified on elements.
A very basic ex...
Myron asked 15/3, 2012 at 22:23
1
Solved
Is it possible to match all nodes that have a data-* attribute using only CSS?
Here are examples of attributes I would like to match:
data-scope
data-sessionlink
data-visibility-tracking
...
Nealson asked 26/4, 2016 at 19:43
4
On elements I can specify the data attributes as, e.g.
<div data-widget-type="MyWidgetType1" data-property1="20" data-property2="test">
...
</div>
I want to capture these in a class ...
Machree asked 12/4, 2016 at 6:54
2
I am updating a data attribute by jQuery, Like:
jQuery('div').data('hidden', 'true');
alert(jQuery('div').data('hidden'));
Data attribute value got changed and returned new value which is true b...
Guess asked 16/7, 2013 at 3:52
5
Solved
I'm struggling with what is probably a very simple bit of jQuery
I have html like this:
<div class="star-rating" data-star-rating="5.0"></div>
<div class="star-rating" data-star-ra...
Benildis asked 18/3, 2016 at 13:0
2
What is the difference between href and data-href attribute in html <a></a> tag?
My current code is written below:
<a id="sign_in_with_facebook" href="verify_phone_process_1.html" c...
Aguiar asked 15/3, 2016 at 19:13
8
Solved
I am trying to use HTML5 data- attributes in my ASP.NET MVC 1 project. (I am a C# and ASP.NET MVC newbie.)
<%= Html.ActionLink("« Previous", "Search",
new { keyword = Model.Keyword, page = Mo...
Songsongbird asked 26/3, 2010 at 0:46
3
Solved
I have this select JSX:
<select className="form-control" onChange={this.onChange} value={this.props.value}>
{options}
</select>
with options being:
var options = this.props.optio...
Octahedral asked 19/2, 2016 at 17:48
6
Solved
I have this input with data-options attribute.
<input class="data" type="text" data-options="{maxDate:'0'}" />
I would like to load the datepicker using the data-options value as options. ...
Durango asked 17/12, 2015 at 13:45
4
Solved
I am trying to select a number of div elements of a certain class but not having certain data attributes. For example, I have 12 divs with data attributes from 1 to 12 and I want to select all of t...
Sarmatia asked 12/1, 2016 at 10:45
© 2022 - 2024 — McMap. All rights reserved.