We set 4 div when the mouse moves over a div, the background color changes.
Then we should know to use the mouseover () and mouseout () before one is moved to a certain position, and then a position is removed.
There is also a hover (,) can replace the top two methods
1. With MouseOver () and Mouseout ()
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
2.hover ()
<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
I can write that.
$ (function () {
var in = function () {
$ (this). CSS ("Background-color", "Red");
}
var out = function () {
$ (this). CSS ("Background-color", "yellow");
$ ("p[id^= ' P ']"). Hover (in,out);
});
The above jquery control div Selection Implementation method is small series to share all the content, hope to give you a reference, but also hope that we support cloud habitat community.