jquery div click, anchors
to click-able divs, i do:
<div class="clickable" url="http://google.com">
blah blah
</div>
and following
$("div.clickable").click(
function()
{
window.location = $(this).attr("url");
});
i don't know best way, nonetheless works ideally me, solely issue:
if div contains click-able element, such as
<a href="...">, user clicks hyperlink, both hyperlink div's-clickable called
this generally problem anchor add-on referring javascript ajax function, executes ajax duty and follows couple 'url' charge div.
anyway around this?
Comments
Post a Comment