Home
Web Front-end
JS Tutorial
The drop-down box effect produced when the mouse is hovered by js_jquery



The drop-down box effect produced when the mouse is hovered by js_jquery
drop down box
Let me give you a tutorial first and give you a simple example:
Copy the code The code is as follows:
jq=jQuery.noConflict();
jq=(document).ready(function(){
jq("a").mouseover( function(){
jq("a").css("color","#c00");
});
jq("a').mouseout(function(){
jq("a").css("color","#000000″);
});
< ;a href="www.jb51.net">Mouse over it and see what happens
jq =jQuery.noConflict();
This is the jquery library name that defines a js;
jq(document).ready(function(){
/*This is a function about the document object. Inside is the function Content*/
});
jq("a").mouseover()function(){
/*This is the content that defines the event mouseover*/
}. A practical example; hide text when clicked:
Copy code The code is as follows:
div.abc {
background: #e5eec;
padding: 7px;
margin: 0px;
border: solid 1px #c00; }
< ;/stype>
This This text will be hidden when you click hideme
This text will also be hidden.