Because hover is not a standard event, you cannot directly use live for processing. Therefore, use the following method instead, with the same effect.
Copy codeThe Code is as follows:
$ ("<SPAN style =" COLOR: # 0000ff "> table tr </SPAN>"). live ({
<SPAN style = "BACKGROUND-COLOR: #99 ccff"> mouseenter: </SPAN>
Function ()
{
<SPAN style = "COLOR: #008000"> // todo </SPAN>
},
<SPAN style = "BACKGROUND-COLOR: #99 ccff"> mouseleave: </SPAN>
Function ()
{
<SPAN style = "COLOR: #008000"> // todo </SPAN>
}
});
In the circular output <div>, you can use $ (this). find () to process only the content in a <div>:
Copy codeThe Code is as follows:
<Body>
<Div class = "<SPAN style =" COLOR: # 0000ff "> water </SPAN>">
<Div class = "<SPAN style =" COLOR: # 0000ff "> action </SPAN>" style = "<SPAN style =" COLOR: # 3366ff "> display: none </SPAN> ">
<A href = "#"> <div class = "left"> {lang user/repick} </div> </a>
<A href = "#"> <div class = "right"> {lang user/reply} </div> </a>
</Div>
</Div>
<Div class = "<SPAN style =" COLOR: # 0000ff "> water </SPAN>">
<Div class = "<SPAN style =" COLOR: # 0000ff "> action </SPAN>" style = "<SPAN style =" COLOR: # 3366ff "> display: none </SPAN> ">
<A href = "#"> <div class = "left"> {lang user/repick} </div> </a>
<A href = "#"> <div class = "right"> {lang user/reply} </div> </a>
</Div>
</Div>
<Div class = "<SPAN style =" COLOR: # 0000ff "> water </SPAN>">
<Div class = "<SPAN style =" COLOR: # 0000ff "> action </SPAN>" style = "<SPAN style =" COLOR: # 3366ff; BACKGROUND-COLOR: # ffffff "> display: none </SPAN>">
<A href = "#"> <div class = "left"> {lang user/repick} </div> </a>
<A href = "#"> <div class = "right"> {lang user/reply} </div> </a>
</Div>
</Div>
<Div class = "<SPAN style =" COLOR: # 0000ff "> water </SPAN>">
<Div class = "<SPAN style =" COLOR: # 0000ff "> action </SPAN>" style = "<SPAN style =" COLOR: # 3366ff "> display: none </SPAN> ">
<A href = "#"> <div class = "left"> {lang user/repick} </div> </a>
<A href = "#"> <div class = "right"> {lang user/reply} </div> </a>
</Div>
</Div>
<Script type = "text/javascript">
$ ("<SPAN style =" COLOR: # 0000ff ">. water </SPAN>"). <SPAN style = "COLOR: #800080"> hover </SPAN> (
Function (){
$ (This ). <SPAN style = "COLOR: #800080"> find </SPAN> ("<SPAN style =" COLOR: # 0000ff ">. action </SPAN> "). show ();
},
Function (){
$ (This ). <SPAN style = "COLOR: #800080"> find </SPAN> ("<SPAN style =" COLOR: # 0000ff ">. action </SPAN> "). hide ();
}
)
</Script>
</Body>