Trying to use Jquery to do a Cursor Pointer on hover:
$('#example td').hover(function() {
$(this).css('cursor','pointer');
});
I do not want to put it in CSS, I want it in Jquery.
What do I need to do to fix this?
http://jsfiddle.net/Egttj/
Alternatively referred to as mouseover or mouse hover, hover describes the act of moving a mouse pointer over a clickable object, but not actually clicking the left or right mouse button. For example, when you hover your mouse over any of the links on this page, they should change color, indicating they can be clicked.
How to make the cursor to hand when a user hovers over a list item using CSS? Use CSS property to create cursor to hand when user hovers over the list of items. First create list of items using HTML <ul> and <li> tag and then use CSS property :hover to cursor:grab; to make cursor to hand hover the list of items.
The default cursor for a hyperlink is "pointer". To change it, you need to specify the cursor type for your <a> element with the CSS :hover selector.
It seems to work here after I cleared up your jquery, you forgot to close the first click function and the searchform and button aren't declared in your html (i changed it to #example tr)
Basically your jQuery wasn't that well coded (there also was a line with 5.}) on it that didn't belong there).
I also set the "your framework" to jQuery instead of the standard selected mooTools
This is the complete jQuery code I got after i deleted some unnecessary code:
$(document).ready(function() {
$('#example tr').click(function() {
var href = $(this).find("a").attr("href");
if(href) {
window.location = href;
}
});
$('#example tr').hover(function() {
$(this).css('cursor','pointer');
});
});
Fiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With