$(selector).hover(handlerIn, handlerOut)
Highlight #target on mouseenter and set it bck to white on mouseleave
Another option is $(selector).hover(handlerInOut), fire the same handler for mouseenter and mouseleave events
Demo Example:
Mouse over to highligh the row you point to in the table
Another same way but using just one function
Additional Notes:
.toggle(), take turns to change color after mouse click
#efefef –> #fff –> Yellow –> #efefef –> #fff –> …
沒有留言:
張貼留言