I have the following code that when pressing a <a href
I get the url of this one:
<a href="http://localhost/uno/dos.zip">DESCARGAR</a>
and jQuery
$('a').click(function(event) {
var url = $('a').attr('href');
alert(url);
});
The problem is this: when I press the link in the index.php page that I'm doing, when I press the jQuery function that shows a url is executed, but this function takes only the value of link and not the entire url link that is in <a href
more above.
Is there any other option apart from href?