Horje
jquery get data attribute value by class Code Example
jquery get data attribute value
/* html */
<a rel="nofollow" data-id="123">link</a>

/* js */
$(this).attr("data-id") // returns string "123"

$(this).data("id") // returns number 123 (jQuery >= 1.4.3 only)
jquery find by data attribute
$('.slide-link[data-slide="0"]').addClass('active');
jquery get element by data attribute
$("ul[data-slide='" + current +"']");
jquery get data attribute value by class
//get the result as array
<option value="<?php echo $value['id']; ?>" data-count="5">
</option>

var data = $('.myclass').map(function() {
    return $(this).data('optionid');
}).get();




Javascript

Related
Circular Queue in javascript Code Example Circular Queue in javascript Code Example
javascript if return true false Code Example javascript if return true false Code Example
alert library css and js Code Example alert library css and js Code Example
stack navigation Code Example stack navigation Code Example
Truncate a string using javascript Code Example Truncate a string using javascript Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7