


jquery implements TAB switching code for opening a web page with animated effects for the first time
This article mainly introduces the TAB switching code of jquery when opening a webpage with animation effect for the first time. It involves the dynamic transformation implementation techniques of jquery controlling page element attributes through mouse click events. It has certain reference value. Friends who need it can refer to it.
The example of this article describes how jquery implements the TAB switching code for opening a web page with animated effects for the first time. Share it with everyone for your reference. The details are as follows:
This is a TAB code that has an animated web page when it is opened for the first time. The animation will only be displayed when the TAB menu is clicked for the first time, and will disappear when it is clicked again. It is a practical web page. Tab effect, please download it if you need it.
The screenshot of the running effect is as follows:
The online demonstration address is as follows:
http://www.php.cn/
The specific code is as follows:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>网页TAB代码</title> <script type="text/javascript" src="jquery1.3.2.js"></script> <style type="text/css"> body,h1,p,ul,li{ margin:0; padding:0;} li{ list-style:none;} .demo{ width:300px; margin:30px auto; position:relative;} .demo li{ float:left; padding:0 15px; cursor:pointer; height:30px; line-height:30px;} .d-bk{} .demo li.cur{ background-color:#F00; color:#FFF;} .demo li.cur .d-bk{ border:1px solid #F00; width:300px; height:150px; background-color:#f1f1f1; position:absolute; left:0; top:30px; color:#333;} </style> <script type="text/javascript"> $(document).ready(function(){ $(".demo li p").hide(); $(".demo li").click(function(){ $(this).addClass("cur").siblings().removeClass("cur"); $("p.d-bk").slideDown() },function(){ $("p.d-bk").slideUp() }) }) </script> </head> <body> <ul class="demo"> <li> 导航1 <p class="d-bk">111</p> </li> <li> 导航2 <p class="d-bk">222</p> </li> <li> 导航3 <p class="d-bk">333</p> </li> </ul> </body> </html>
For more jquery implementation of TAB switching code for opening a webpage with animated effects for the first time, please pay attention to the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Article discusses creating, publishing, and maintaining JavaScript libraries, focusing on planning, development, testing, documentation, and promotion strategies.

The article discusses strategies for optimizing JavaScript performance in browsers, focusing on reducing execution time and minimizing impact on page load speed.

Frequently Asked Questions and Solutions for Front-end Thermal Paper Ticket Printing In Front-end Development, Ticket Printing is a common requirement. However, many developers are implementing...

The article discusses effective JavaScript debugging using browser developer tools, focusing on setting breakpoints, using the console, and analyzing performance.

This article explores effective use of Java's Collections Framework. It emphasizes choosing appropriate collections (List, Set, Map, Queue) based on data structure, performance needs, and thread safety. Optimizing collection usage through efficient

The article explains how to use source maps to debug minified JavaScript by mapping it back to the original code. It discusses enabling source maps, setting breakpoints, and using tools like Chrome DevTools and Webpack.

This tutorial will explain how to create pie, ring, and bubble charts using Chart.js. Previously, we have learned four chart types of Chart.js: line chart and bar chart (tutorial 2), as well as radar chart and polar region chart (tutorial 3). Create pie and ring charts Pie charts and ring charts are ideal for showing the proportions of a whole that is divided into different parts. For example, a pie chart can be used to show the percentage of male lions, female lions and young lions in a safari, or the percentage of votes that different candidates receive in the election. Pie charts are only suitable for comparing single parameters or datasets. It should be noted that the pie chart cannot draw entities with zero value because the angle of the fan in the pie chart depends on the numerical size of the data point. This means any entity with zero proportion

Once you have mastered the entry-level TypeScript tutorial, you should be able to write your own code in an IDE that supports TypeScript and compile it into JavaScript. This tutorial will dive into various data types in TypeScript. JavaScript has seven data types: Null, Undefined, Boolean, Number, String, Symbol (introduced by ES6) and Object. TypeScript defines more types on this basis, and this tutorial will cover all of them in detail. Null data type Like JavaScript, null in TypeScript
