Home > Web Front-end > JS Tutorial > Tab switching based on jquery js principle_jquery

Tab switching based on jquery js principle_jquery

WBOY
Release: 2016-05-16 18:30:43
Original
1401 people have browsed it
html code:
Copy code The code is as follows:


  • ProfileAccount maintenance
  • Come here< ;/li>

1111111111111111111111111111111




js code:
Copy code The code is as follows:

$(function(){
$(".tab>li").mouseover(function(){
$(".tab>li ").removeClass("on");
$(this).addClass("on");
var target = $('#' this.rel);
if (target.size( ) > 0) {
$('.details > dl').hide();
target.show();
} else {
alert('There is no such container .');
}
});
});

Rendering:


Package download address

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