Home  >  Article  >  Web Front-end  >  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

WBOY
WBOYOriginal
2016-05-16 17:48:451189browse

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.






Copy code
The code is as follows: < ;!–author linuxa
blogs: www.jb51.net–>

>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn