how to get href value of anchor tag in jquery in list
<ul class="sub_menu">
<li><a href="caps">Caps</a></li>
<li><a href="jeans">Jeans</a></li>
<li><a href="shorts">Shorts</a></li>
<li><a href="foootwear">Footwear</a></li>
</ul>
$('ul.sub_menu li a').click(function() {
event.preventDefault();
var txt = $(this).attr('href');
alert(txt);
});
Also in JavaScript:
- react map wait axios call
- application/ld+json react
- react hide source code
- react native notifications error
- node filesystem change directory of a file
- how to auto close alert box javascript
- create fooer on print page with jquery
- check if a word exists in dictionary javascript
- Cannot assign to read only property 'value' of object '[object Object]
- Node Sass could not find a binding for your current environment
- flutter local json storage
- js remove class
- function click anywhere javascript
- return value from javascript function
- emit resize event in angular
- active-class router-link
- if both td data are same then merze how in javascript
- loop json object android java
- gatsby-plugin-nprogress
- cell get row google script
- Write a javascript program to find roots of quadratic equation.
- javascript set localstorage
- javascript time execution
- nodejs add element to array