Home > Web Front-end > HTML Tutorial > Page left navigation bar_html/css_WEB-ITnose

Page left navigation bar_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:21:06
Original
1856 people have browsed it

As shown in the picture, this is a left menu (I took two pictures). The picture in front indicates the parent menu. Some parent menus contain submenus. Click on the parent menu and it will change color (as shown in the picture) Effect on the right), click on the submenu, the font of the submenu changes color, and the background of the parent menu changes color (the effect on the left side of the picture). Now the menu bar on the left is an extracted public page, and an identifier is added to each menu. When the menu is clicked , jump to the action, call the method, and then display the data on the page. The difficulty is, 1: When clicking the submenu, the parent menu must also be selected. 2: There are many parent nodes that jump to the same action, the same method, but the return page is different, so there is no way to judge even if you add an identifier. Please help me solve it.
Online. . . [img=http://b227.photo.store.qq.com/psb?/V13H6l0L0oFC2O/VdDpnR5EU02v954TJe4ENUhFMi6MoMC5rjRtt9YLKn8!/b/dMmLUIdDGAAA&bo=IAPBAQAAAAADAMY!][/img]


Reply to the discussion (Solution )

For jquery, remove event bubbling and add event.preventDefault();.


	$(function(){		$(".select").click(function(event) {			event.preventDefault();			alert("我不会向上冒泡了..");		});           });
Copy after login

I can’t understand it

Haha... I got the points

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