Javascript code to implement a silver-gray vertical collapse menu with 3D stereoscopy _ javascript skills

Source: Internet
Author: User
This article mainly introduces JavaScript code for implementing the silver-gray vertical bar folding menu with 3D stereoscopy, which can achieve the basic function of dynamically expanding and folding the menu bar in JS response to mouse events. It has some reference value, for more information about how to use JavaScript to implement the silver-gray vertical collapse menu code, see the example in this article. We will share this with you for your reference. The details are as follows:

This is a cool menu that can be used to fold multiple levels of silver-gray vertical bars on the left side of the webpage. You can add a background to the menu by yourself and leave code in the CSS, this is a standard and classic background management mode menu. The Div + Css structure conforms to the standard and is easy to modify.

The running effect is as follows:

The Online Demo address is as follows:

Http://demo.jb51.net/js/2015/js-3d-left-yhs-menu-demo/

The Code is as follows:

 Vertical menu on the left of the webpage
 
 

Website Dynamics
  • Today's attention
  • Latest sorting
  • Download ranking
Manage news
  • News Classification
  • News list
  • Review News
Script function showsubmenu (sid) {whichEl = eval ('submenu '+ sid); if (whichEl. style. display = 'None') {eval ("submenu" + sid + ". style. display = '';"); eval ("dt" + sid + ". className = 'dt2'; ");} else {eval (" submenu "+ sid + ". style. display = 'none'; "); eval (" dt "+ sid + ". className = 'dt1'; ") ;}} function showbg (sid) {whichEl = eval ('submenu '+ sid); if (whichEl. style. display = 'None') {eval ("dt" + sid + ". className = 'dt4'; ");} else {eval (" dt "+ sid + ". className = 'dt3 '; ") ;}} function showoutbg (sid) {whichEl = eval ('submenu' + sid); if (whichEl. style. display = 'None') {eval ("dt" + sid + ". className = 'dt1'; ");} else {eval (" dt "+ sid + ". className = 'dt2'; ") ;}} script

I hope this article will help you design JavaScript programs.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.