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

Jquery.addClass is always invalid reason analysis_jquery

WBOY
Release: 2016-05-16 17:23:15
Original
1534 people have browsed it

Add the following to the setAdminTabs.js code:

Copy the code The code is as follows:

$("# adminTabs li").mouseover(function(){$(this).addClass("selectedTab")});

always does not work for the following reasons:
Copy code The code is as follows:

.selectedTab{background-color:White; border-bottom:1px}

Define two attributes, which exist in the admin.css file, as follows:
Copy the code The code is as follows:

#adminTabs ul li{ float:left; border: #E0E0E0 1px solid; margin-right:10px; padding:5px 10px; line-height:20px; width:80px; text-align:center ; background-color:#EEEEEE;}

Jquery makes it not work
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!