method Name:hover (over, out)
Overview: When you move the mouse over a matching element, the first function that you specify is triggered. When the mouse moves out of this element, the specified second function is triggered.
Parameters:
1) overfunction
Move the mouse over the element to trigger the function
2) outfunction
Move the mouse out of the element to trigger the function
Example:
1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8" />5 <title>Mouse slide over effect</title>6 <Scriptsrc= "Http://files.cnblogs.com/ningvsban/jquery1.8.3.min.js"type= "Text/javascript"></Script> 7 <Scripttype= "Text/javascript">8 $ (document). Ready (function() {9 //$ ("#orderedlist tbody tr"). CSS ("text-align", "center");Ten $("#orderedlist tbody TR"). css ({"text-align":"Center"}); One $("#orderedlist tbody TR"). Hover (function() { A $( This). addclass ("Blue"); - }, function() { - $( This). Removeclass ("Blue"); the }); - }); - </Script> - <style> + . Blue{ - background:#bcd4ec; + cursor:Pointer; A } at </style> - </Head> - <Body> - <TableID= "Orderedlist"width= "50%"Border= "0"cellspacing= "0"cellpadding= "0"> - <thead> - <TR> in <th>Name</th> - <th>Age</th> to <th>Qq</th> + <th>Email</th> - </TR> the </thead> * <tbody> $ <TR>Panax Notoginseng <TD>Aaaa</TD> - <TD>20</TD> the <TD>1111</TD> + <TD>[Email protected]</TD> A </TR> the <TR> + <TD>BBBB</TD> - <TD>21st</TD> $ <TD>2222</TD> $ <TD>[Email protected]</TD> - </TR> - <TR> the <TD>CCCC</TD> - <TD>22</TD>Wuyi <TD>333</TD> the <TD>[Email protected]</TD> - </TR> Wu </tbody> - </Table> About </Body> $ </HTML> - </HTML>
: