Linked Questions
24 questions linked to/from jQuery selectors on custom data attributes using HTML5
13
votes
1
answer
29k
views
Select td based on data attribute [duplicate]
Possible Duplicate:
Jquery selectors on custom data attributes on HTML5
How can I select all td with html data attribute equal to some value?
E.G. Fiddle
$("td").dblclick(function (e) {
...
2
votes
1
answer
3k
views
How to target specific attribute with a certain value in jQuery? [duplicate]
The problem I am trying to solve is this:
Write the function newMessage, which receives the name of the topic as the parameter. Function should change the background-color of the p tag to red where ...
-1
votes
3
answers
3k
views
How to get the value of select tag with certain class and data attribute? [duplicate]
<div id='participant-detail'>
<select class="form-control quantity" data-short-name="8">
</select>
<select class="form-control quantity" data-short-name="6">...
-1
votes
2
answers
89
views
How can i use jquery to find an item by a different attribute than class? [duplicate]
I have the following html on a page:
<span class="descriptionLink" projectid="14180">
Some text
</span>
<span class="descriptionLink" projectid="14181">
...
1209
votes
11
answers
1.3m
views
Selecting element by data attribute with jQuery
Is there an easy and straight-forward method to select elements based on their data attribute? For example, select all anchors that has data attribute named customerID which has value of 22.
I am ...
136
votes
5
answers
136k
views
Filter element based on .data() key/value
Say I have 4 div elements with class .navlink, which, when clicked, use .data() to set a key called 'selected', to a value of true:
$('.navlink')click(function() { $(this).data('selected', true); })
...
131
votes
7
answers
134k
views
Unable to set data attribute using jQuery Data() API
I've got the following field on an MVC view:
@Html.TextBoxFor(model => model.Course.Title, new { data_helptext = "Old Text" })</span>
In a seperate js file, I want to set the data-helptext ...
1
vote
5
answers
14k
views
How to select previous element in jquery?
i have an image and i would like to assign which element of the area is clickable.
The red stripe shouldn't be clickable.
My HTML solution:
<img src="" data-highres="" usemap=&...
5
votes
2
answers
3k
views
Best practice to store array of values in html attr?
What is the best practice to store an array of values in a html (from php) attribute and later access them from javascript/jQuery?
<div class="storage" someAttr=?? /></div>
Its basically ...
-1
votes
3
answers
5k
views
jQuery selectors on custom data attribute that are not empty
I want to create a simple custom tooltip plugin for jQuery that for every element that has a data-custom-tooltipset. So, something like :
<a href= . . . " data-custom-tooltip="This is my tooltip ...
1
vote
2
answers
2k
views
Search div using data attribute value
Search elements based on data attributes.
I have the following code and would like to know, how can this be achieved if the data attribute value with space
<div class="data" data-value="auto"> ...
2
votes
1
answer
522
views
jQuery attribute equals selector not working for custom attribute
Hi am attempting to fire off some jQuery on the click event of a div. I am attempting to target the element via jQuery's attribute equals selector, but I have not had any luck so far. I've used this ...
0
votes
1
answer
759
views
jQuery: find elements where data attribute is has a specific value
I have a master checkbox Select all along with a button to revert back to their original state to which there were loaded with. After the page is loaded I bind a data property to each of the ...
0
votes
2
answers
218
views
How to wrap elements only if attributes match with jQuery?
So I have this code:
$('.brandModelWrapperGroup').each(function(){
var group = $(this).attr('data-model-group')
var brandModelwrapperdivs = $(this).find(".brandModelWrapper")
for(var i = 0; i &...
1
vote
1
answer
125
views
How to fetch a div content based on a inner value contained in it?
On Click on the plus icon it will increase the quantity of the corresponding Item and updates that to the MyOrders tab div .
Now on clcik of the Myorders tab div , how can i extract the ...