Skip to content
This repository has been archived by the owner. It is now read-only.

Latest commit

 

History

History
85 lines (70 loc) · 2.11 KB

File metadata and controls

85 lines (70 loc) · 2.11 KB
layout post
title Center-Menu
description center menu
platform js
control Menu
documentation ug
api /api/js/ejmenu

Center Menu

You can align the Menu items to center by setting “enableCenterAlign” property as true. enableCenterAlign property accepts Boolean value. By default, its value is false. When set to true, then the root menu items is aligned in center.

Add the following code in your <script> section.

{% highlight html %}

  • Home
    • Foundation
    • Launch
    • About
      • Company
      • Location
  • Services
    • Consulting
    • Outsourcing
  • About
  • Contact us
    • Contact number
    • E-mail
  • Careers
    • Position
      • Developer
      • Manager
    • Apply online

{% endhighlight %}

{% highlight javascript %}

    jQuery(function ($) {
        $("#menu").ejMenu({
            width: 500,
            enableCenterAlign: true
        });
    });

{% endhighlight %}

The following screenshot displays the output of the above code.