GithubHelp home page GithubHelp logo

ax5ui / ax5ui-menu Goto Github PK

View Code? Open in Web Editor NEW
21.0 6.0 2.0 884 KB

Javascript UI Component - Menu (Context Menu, Inline Menu)

Home Page: http://ax5.io/ax5ui-menu/demo/index.html

License: MIT License

JavaScript 55.07% CSS 25.43% HTML 19.24% Shell 0.25%
menu context-menu bootstrap-menu jquery jquery-menu

ax5ui-menu's Introduction

Build Status npm version

ax5ui-menu

"menu" displays a list of items in a hierarchical structure.

ax5menu

Dependencies

Install with bower

bower install ax5ui-menu

bower is web front-end package manager. bower is web front-end package manager. When you install bower, it will be installed under the bower_components folder to resolve the plug-in dependencies.
(You can change the folder location. .bowerrc )

It is recommended that you install by using bower. If you've never used bower, please refer to http://bower.io/#install-bower.

Install with npm

If you do not use bower, it also can be installed by using npm as an alternative. In case of npm, which is the package manager for the front end, you need to solve the problem of plug-in dependencies.

npm install jquery
npm install ax5core
npm install ax5ui-menu

After downloading the install file of npm, you will need to copy it to the location where you want to use as a resource for the project. If the copy process is inconvenient, it also can be done easily by using gulp or grunt.

Download code

Insert "ax5menu" in HTML HEAD.

Folder location can be any for your project. However, please be sure to assign the right path in the project.

<link rel="stylesheet" type="text/css" href="https://cdn.rawgit.com/ax5ui/ax5ui-menu/master/dist/ax5menu.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/ax5ui/ax5core/master/dist/ax5core.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/ax5ui/ax5ui-menu/master/dist/ax5menu.min.js"></script>

CDN urls This is a list of CDN urls for ax5ui-menu. ax5ui offers the CDN services through rawgit.

https://cdn.rawgit.com/ax5ui/ax5ui-menu/master/dist/ax5menu.css
https://cdn.rawgit.com/ax5ui/ax5ui-menu/master/dist/ax5menu.js
https://cdn.rawgit.com/ax5ui/ax5ui-menu/master/dist/ax5menu.min.js

Basic Usage

var menu = new ax5.ui.menu({
    theme: 'primary',
    items: [
        {label: "Menu 0"},
        {label: "Menu 1"}
    ]
});

$(document).bind("contextmenu", function (e) {
    menu.popup(e); // e || {left: 'Number', top: 'Number', direction: '', width: 'Number'}
    ax5.util.stopEvent(e);
});

Preview

If you have any questions, please refer to the following gitHub

Question

axisj-contributed

ax5ui-menu's People

Contributors

dongyoung86 avatar groovedk avatar hoksi avatar hyunjun19 avatar mojosoeun avatar thomasjang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ax5ui-menu's Issues

TypeError: i.queue[e] is undefined when using jQuery v2.1.1

I found Issue when using jquery version 1.7+
menu will be displayed far away from the ax5 popup menu, and the firebug said "TypeError: i.queue[e] is undefined", but when using jquery version 1.7 the menu working OK

I need to use newer version of jquery instead sticking on 1.7
currently I using this version of jquery

<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> <script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>

Image attached
axmenu5failed

Item on Click

I am trying to find how to create item on click function out but i could not what am i missing? Can you please give an example how to do it? I tried something like this:

menu.onLoad = function(){
        $(this).find("[data-menu-item-index]").on('click', function(){            
            var index = $(this).getAttribute("data-menu-item-index");
            if(index == 0){
                do something....
            }
            else if(index == 1){
                do another thing
            }
            else if(index ==2){
                do etc...
            }
        });
    };

메뉴 아이템이 하나일 경우

원래 의도한 것인지 아닌지 모르겠지만, 아이템이 하나만 있을 경우 호버 이벤트가 기본으로 먹혀서 원래 아이템의 배경 색상이 보이지 않습니다.

Hide item on runtime?

How to hide or remove item on runtime? I didn't want to show item for specified condition

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.