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

jQuery implements the method of modifying the style when the mouse is passed_jquery

WBOY
Release: 2016-05-16 16:04:06
Original
1479 people have browsed it

The example in this article describes how jQuery implements mouse-over modification of styles. Share it with everyone for your reference. The details are as follows:

$(document).ready(function () {
 //默认情况下样式
 $("input:text").attr("style","border:1px solid #7E9DB9;");
 //鼠标移入样式
 $("input:text").mouseover(function () {
  $(this).attr("style","border:1px solid #EDBB72;");
 });
 //鼠标移开样式
 $("input:text").mouseout(function () {
  $(this).attr("style","border:1px solid #7E9DB9;");
 });
});
Copy after login

I hope this article will be helpful to everyone’s jQuery programming.

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