jQuery : other links inside div element link
How do I set the div link except my custom links inside the div element?
What I want is that if I click the icon in the div box, it connects the
link connected with the icons, and if I click the rest area of the div
element, it goes to the link that is connected with div element. The
following code, however, the jQuery for div element overwrite everything
so even if I have the link for the icon(png), it goes to the div link.
How do I separate with all the icons still in the div element?
Thanks
<script type="text/javascript">
$(document).ready(function(){
$(".Apps").click(function(){
window.open($(this).find("a").last().attr("href"));
return false;
});
});
</script>
<div class="Apps">
<p><b>Web Dev Project 3</b><br><i>(coming soon)</i></p>
<a href="https://github.com/" target="blank">
<img src="https://github.com/apple-touch-icon-114.png" width="30"
height="30"/></a>
<a href="http://google.com" target="blank">
<img id="logo"
src="http://cclub.slc.engr.wisc.edu/images/Under-Construction.gif"
width="30" height="30"/></a>
<a href="http://google.com" target="blank"></a>
</div>
No comments:
Post a Comment