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

Tab switching based on jquery js principle_jquery

WBOY
WBOYOriginal
2016-05-16 18:30:431391browse
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

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