get attribute value jquery
var some_var = $( some_jquery_selector ).attr( 'some_attribute_name' );
get attribute value jquery
var some_var = $( some_jquery_selector ).attr( 'some_attribute_name' );
jQuery( "[attribute|='value']" )
/* Description: Selects elements that
have the specified attribute with a value either equal to a given string or
starting with that string followed by a hyphen (-). */
<body>
<a href="example.html" hreflang="en">Some text</a> <!-- will select this -->
<a href="example.html" hreflang="en-UK">Some other text</a> <!-- will select this -->
<a href="example.html" hreflang="english">will not be outlined</a> <!-- not this -->
<script>
$( "a[hreflang|='en']" ).css( "border", "3px dotted green" );
</script>
</body>
</html>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us