I have links like this:
<li><a href="#" data-value="Codes">Get codes</a></li>
<li><a href="#" data-value="Product">Get products</a></li>
How can I make it so that when I click on the link then a function gets called passing the value that’s contained in data-value?
function refreshGrid(value) { }
Try the following: