In jQuery it's easier with an ID, but you can bind to any <a>
as well:
$("a").bind("dblclick", function(){
alert("Double Clicked");
}).click(function() {
return false; //Prevent single click
});
However, if you want a double click, I'd suggest using an element other than <a>
for this, like a <span>
or <div>
Then it's much simpler like this:
$("#myDiv").bind("dblclick", function(){
alert("Double Clicked");
//Go to some link, etc, whatever you want
//Example, going to a link on double-click:
//window.location = $(this).attr("href");
});
And the markup side:
<sj:div id="myDiv" href="%{link}">Bližnjica</sj:div>