jquery select by data attribute
snippet in javascript

jquery select by data attribute

user5854

$('div[data-key=value]');

jquery select element with data

user1855

$('[data-attribute="value"]');

custom attribute jquery selector

user4804

$("ul[data-group='Companies'] li[data-company='Microsoft']") //Get all elements with data-company="Microsoft" below "Companies"

$("ul[data-group='Companies'] li:not([data-company='Microsoft'])") //get all elements with data-company!="Microsoft" below "Companies"

jquery find by data attribute

user2755

$('.slide-link[data-slide="0"]').addClass('active');

js select by data attribute

user6978

$("[attribute=value]")