So ive got a JS function that's run when multiple html href's are clicked. That is to say, i have about 4 different href's that look similar to this:
<a href='#' onClick="myPopup()">New Window</a>
and my JS looks like this :
<script language="javascript" type="text/javascript">
<!--
function myPopup()
{
window.open( "account_edit.php", "myWindow", "status = 1, height = 300, width = 300, resizable = 0" )
}
//-->
</script>
my point is, i dont want to have to re-write that one block of script another 3 times. Is there a way i can get the script to tell which href was clicked, then open up its respective page? Obviously normal href's are out of the picture, else i would do it. Thanks for the help!
[jQuery.data]([http://api.jquery.com/jQuery.data/)method to extract an arbitrary value from your anchor tag.