What is the difference in usage between $.data and $.attr when using data-someAttribute?  My understanding is that $.data is stored within jQuery's $.cache, not the DOM. Therefore, if I want to use $.cache for data storage, I should use $.data....
I'm using the jQuery quicksand plugin. I need to get the data-id of the clicked item and pass it to a webservice. How do I get the data-id attribute? I'm using the .on() method to re-bind the click event for sorted items.    $("#list li...
I would like to know what selectors are available for these data attributes that come with HTML5.  Taking this piece of HTML as an example:  <ul data-group="Companies">   <li data-company="Microsoft"></li>   <li...
I have next html:  <span data-typeId="123" data-type="topic" data-points="-1" data-important="true" id="the-span"></span>   Is it possible to get the attributes that beginning with data-, and use...
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, but they didn't work (the both r...
I'm trying to select all elements that have a data-go-to attribute that is not empty.  I've tried $('[data-go-to!=""]') but oddly enough it seems to be selecting every single element on the page if I do that....
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 figure out how to set the values to be a f...
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 click function. Something like this:      <...
This is my first question on stackoverflow - needing help from all you experts. Our web app allows the user to input escape/special characters. We are doing some testing for extreme cases. I'm able to pass the escape characters through ajax/json....
I am trying to strip the username and / values from lists of gists within Github Gists, the problem being there are no classes/ids or a selector available for the / value.    Here is the HTML and link to Github Gists page and JSFiddle:  <div class...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.