find attribute jquery code example
Example 1: get name jquery
$('#yourid').attr('name')
Example 2: find element with data attribute jquery
$("ul").find(`[data-slide='${current}']`)
Example 3: get attribute value jquery
var some_var = $( some_jquery_selector ).attr( 'some_attribute_name' );
Example 4: jquery show hide based on data attribute
$('form')
.children()
.filter(function(){
return $(this).data('show') === 'pro';
})
.show();
$('form')
.children()
.filter(function(){
return $(this).data('show') === 'home';
})
.hide();
Example 5: jquery get name attribute
$( "input[name='Hot Fuzz']" );