Issue
// clickable blocks
$(".product").click(
function () {
window.location = $(this).find('a').attr("href").css("cursor", "pointer");
return false;
});
The container is made clickable but the cursor remains the same. Why isn't the css selector working?
Solution
- Find all the products that have a link
- Puts a pointer as cursor
- Handle the click event to change location
The code:
$(".product:has(a[href])")
.css("cursor", "pointer")
.click(function()
{
window.location = $("a", this).attr("href");
});
Answered By - Vincent Robert
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.