How to make this a tag working with href and onClick function?
(The onClick should run first then href)
Version 1
`` <a href="#" id="myHref">Click me</a>
$("#myHref").on('click', function() {
document.getElementById(".myDiv").style.flexGrow = "5";
window.location = "http://www.google.com";
});`
Version 2
<a href="http://www.google.com" onclick="return myFunction();">Link</a>
function myFunction() {
document.getElementById(".myDiv").style.flexGrow = "5";
}