Jquery implements the menu function (click to expand or close)-generally applied to the background, jquery applied
<! Doctype html>
:
A left-side menu in the background is used to create code, and Jquery is used for folding and expansion. In actual work, JQUEY is usually used?
I can tell you the idea. If there are three menus, we will use three divs and the outermost layer will set a large div to fix them. Clicking to expand will actually change the height of one or two divs, the premise is that the positioning method is well done. Do not absolute positioning. It is difficult to control. Use jquery to respond to click events and use the jquery animate function to create an animation. My computer has just been reinstalled and dreamweaver cannot be installed for you. jquery is very quick to get started.
Question about menu clicking time implemented by jquery
// When processing click expansion, you can close all the previously opened menus.
$ (Document). ready (function (){
$ ("Li. mainlevel"). click (function (){
$ ("Li. mainlevel> ul"). hide ();
$ (This). find ("ul"). slideDown (300 );
});
});