newbie29
asked on
mouse cursor
Hello,
Can someone please let me know how I can change the mouse cursor to hand (as in hyper links) on hover to the image tag using jquery syntax
Please advice
regards
sam
Can someone please let me know how I can change the mouse cursor to hand (as in hyper links) on hover to the image tag using jquery syntax
Please advice
regards
sam
ASKER
any jquery syntax please?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for your help john.....i keep this open to get better jquery syntax
Complete solution with correct jQuery syntax:
<style type="text/css">
.cursor_pointer {
cursor:pointer;
}
</style>
<script type="text/javascript">
$(function() {
$('img').click(
function() {
alert("Hello world!");
}
)
.hover(
function(){
$(this).addClass("cursor_pointer");
},
function(){
$(this).removeClass("cursor_pointer");
}
);
}
</script>
I have found a smaller solution:
$(selector).hover(function () {
$(selector).css("cursor"," pointer");
});
Works fine on my site...
$(selector).hover(function
$(selector).css("cursor","
});
Works fine on my site...
OBJECT.style.cursor = 'hand';