Home > Web Front-end > JS Tutorial > body text

The drop-down box effect produced when the mouse is hovered by js_jquery

WBOY
Release: 2016-05-16 17:48:45
Original
1188 people have browsed it

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–>

>
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!