/ Published in: jQuery
I had a load of divs with 1 link in and I wanted the div to be act as the link.
(add cursor:pointer to the parent Divs css so peeps know they can click it)
Expand |
Embed | Plain Text
$('.parentElement').bind('click', function() { // Change window.location (Address) to the url from this element inside it window.location = $(this).find('.linkClass').attr('href'); });
You need to login to post a comment.
