As shown in the two pictures above, I want to make a menu like this. When you click Order Management, you can see the "View Order" and "Cancel Order" functions, and then click Order Management again to hide it. Please tell me. How to do this? I would be very grateful if you have the code
Click using js event, css cannot control it, move the mouse up to expand it Realize expansion, move outside and shrink, instead of clicking
I am a novice. Personally, I think you can set up a hidden field in which to write the order viewing and cancellation. Use jquery to write the toggle(fn1, fn2,...) method on the page. If fn1 is written as the hidden field, fn2 will be written as the hidden field. Hide
You should use li to do it, li div
Use li tag and CSS to do it. It is very simple to use CSS pseudo-class
First set the display attribute of the secondary menu to none
Then when the mouse moves to the li tag, set it to block
Use javascript events to control the switching of the submenu block style display:none; and display:block; .
Use your own brain instead of letting others do the writing.