How PHP and jquery implement a three-level navigation bar drop-down menu showing an example of the effect

Source: Internet
Author: User
Tags php foreach
This article mainly introduces the Php+jquery implementation of the three level navigation bar drop-down menu display effect, involving the PHP array traversal and jquery Event Response Operation page Element transformation and other related operations skills, the need for friends can refer to the next

The example in this paper describes the effect of the three level navigation bar drop-down menu implemented by Php+jquery. Share to everyone for your reference, as follows:

First Look at:

1. Data configuration file db.php


<?phpreturn Array (' One ' + ' about us ', ' both ' = ' = ' Array (' three_tit ' = ' Company profile ',          ' Three_cont ' + array (' Corporate profile ', ' Organizational structure ', ' development history ', ' Corporate culture ', ' service concept ') ), Array (' three_tit ' = ' Enterprise honors ', ' three_cont ' + = ' award certificate ', ' industry contribution ' , ' Qualification certification ', ' Association activities ', ' achievements of the company '), Array (' three_tit ' + ' sales network ', ' Three_c      ont ' = = array (' ne ', ' North ', ' Middle East ', ' South China ', ' Southwest ', ' Northwest ') )), array (' One ' + ' product show ', ' one ' = ' = ' = ' = ' + ', ' three_tit ' = ' export trade ', ' THR          Ee_cont ' = + Array (' digital products ', ' latest energy ', ' fresh fruit ', ' meat food ', ' clothes ', ' gold and silver jewellery ')          ), Array (' three_tit ' = ' business Services ', ' three_cont ' = = Array (' Certified '), ' Talent training ', ' popular products recommended', ' The latest Technology Frontier ')), array (' One ' + ' news Center ', ' one ' = ' + ' Array (' THR Ee_tit ' + ' Enterprise Dynamics ', ' three_cont ' = + Array (' Company news ', ' New listings ', ' Enterprise Dynamics ')          , Array (' three_tit ' = ' industry dynamics ', ' three_cont ' = = Array (' Media spotlight ', ' industry Focus ',        ' Domestic quotes ', ' International quotes ')), array (' one ' = = ' Contact us ', ' both ' = ' = ' Array (        ' Three_tit ' + ' contact information ', ' Three_cont ' + Array (' online customer service ', ' mailing address ', ' phone fax ', ' online message ') ), Array (' three_tit ' + ' talent recruiting ', ' three_cont ' + = ' project manager ', ' Assistant Secretary ', ' channel Agent ', ' website Engineer '))); >

2.index file


<?phpheader (' Content-type:text/html;charset=utf-8 '); Load data $data = include './db.php ';  Loading HTML files include './nav.html ';? >

3.nav.html file


<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

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.