JS displays the specified items when taskMenu is loaded.

Source: Internet
Author: User

When taskMenu is used, when too many items need to be displayed, only the specified items are displayed when you want to load them.

Var taskMenu1;
Var taskMenu2;
Var item1;
Var item2;
Var item3;
Var item4;

Window. onload = function ()
{
TaskMenu. setHeadMenuSpecial (true );
//////////////////////////////////////// ////////
Item1 = new TaskMenuItem ("TaskMenu Demo ");
Item2 = new TaskMenuItem ("TaskMenu 3.0 API );
Item3 = new TaskMenuItem ("some additional instructions );
Item4 = new TaskMenuItem ("good suggestions and messages ");

TaskMenu1 = new TaskMenu ("about TaskMenu ");
TaskMenu1.add (item1 );
TaskMenu1.add (item2 );
TaskMenu1.init ();

TaskMenu2 = new TaskMenu ("TaskMenu others ");
TaskMenu2.add (item3 );
TaskMenu2.add (item4 );
TaskMenu2.init ();

TaskMenu2. _ close ();/* Turn off the status when taskMenu2 is loaded */

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.