Giter Club home page Giter Club logo

context.js's Introduction

jakiestfu's GitHub stats

context.js's People

Contributors

altmind avatar jakiestfu avatar jchristman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

context.js's Issues

Selecting element to which context menu is attached

Hi!

First off, this tool's really great, thanks a lot for releasing it. I've attached the context menu to a class of elements in my code, and I want to access the element from which the context menu was raised. Is there a clean way to do it? I'm looking for something like the following:

context.attach(".my-class", [
{text: 'Act on right-clicked element', action: function(e){
            e.preventDefault();
                        // Is there a way to get a selector for the clicked item?
            }}]

Mobiles not supported

I have tested on mobile phone on "tap" either "taphold" events and nothing happened. Is there somebody to give an advice?

Support for future versions of Bootstrap.

Thank you for a very nice library @jakiestfu .
I am trying to use it with Bootstrap 4.6.
The standalone version works fine, but when using the Bootstrap version for more consistent styling, there seems to be no padding etc.

Has the library been tested for later versions of bootstrap? Is there any plan for adding that support?
Would you be accepting PRs for the same?

Bootstrap 3 compatibility

I just found Your great plugin, it works awesome!
I was trying to plug it into my existing site that uses Bootstrap 3, but I noticed that dividers are missing and submenus are showing below main menu.
Does this plugin supports Bootstrap 3? Maybe You did some adaptations?

[enhancement] Add missing bower.json.

Hey, maintainer(s) of jakiestfu/Context.js!

We at VersionEye are working hard to keep up the quality of the bower's registry.

We just finished our initial analysis of the quality of the Bower.io registry:

7530 - registered packages, 224 of them doesnt exists anymore;

We analysed 7306 existing packages and 1070 of them don't have bower.json on the master branch ( that's where a Bower client pulls a data ).

Sadly, your library jakiestfu/Context.js is one of them.

Can you spare 15 minutes to help us to make Bower better?

Just add a new file bower.json and change attributes.

{
  "name": "jakiestfu/Context.js",
  "version": "1.0.0",
  "main": "path/to/main.css",
  "description": "please add it",
  "license": "Eclipse",
  "ignore": [
    ".jshintrc",
    "**/*.txt"
  ],
  "dependencies": {
    "<dependency_name>": "<semantic_version>",
    "<dependency_name>": "<Local_folder>",
    "<dependency_name>": "<package>"
  },
  "devDependencies": {
    "<test-framework-name>": "<version>"
  }
}

Read more about bower.json on the official spefication and nodejs semver library has great examples of proper versioning.

NB! Please validate your bower.json with jsonlint before commiting your updates.

Thank you!

Timo,
twitter: @versioneye
email: [email protected]
VersionEye - no more legacy software!

Context menu on top

Hello,

Great library thanks for the sharing.

I have a problem in my app. The context menu always appear on top of my mouse like if I am on the bottom of the page. I wonder if it is because of my html. I use it in the context of a Wakanda application inside of a grid widget.

Do you have any advise to force the context menu to open on bottom of my mouse?

delay creation of DOM elements

Is there an option available that I'm missing which would allow the context menu DOM elements to not be created until it is needed to be displayed?

Support event delivery while using 'trigger'

$(document).on("contextmenu", selector, function (e, ext) {
    e.preventDefault();
    e.stopPropagation();
    if (!e.pageX && ext && ext.event) {
        // trigger
        e = ext.event;
    }
    // ...
}

maybe i met a bug?

i use Context.js like this:
context.attach(".classA",menuArr1);
context.attach(".classB",menuArr2);
but sometimes(i have a test,about twenty times occur five times ),it attach menuArr2 to classA items!
i don't have any ideas?what is the matter?

Sub menu items appearing below and unclickable

Hi, I'm not sure if this repo is still maintained or not, but I'd appreciate some help please.

I need to put some sub-menu items into my context menu, but they are behaving strangely. They appear underneath the main context menu, and I am unable to move to them to click them before they disappear.

I initially thought that this was some conflicting custom css I had, but I've made a menu from scratch on plunker and it does the same.

If you try to select something from the 'sub menu' section you'll see what I mean.

http://plnkr.co/edit/2AcaQb?p=preview

Hopefully I've just done something stupid, and this isn't related to a newer version of BS or the like. Can you help at all?

Many thanks.

Get attached object details in callback

when you do context.attach('selector', ...).
Is there a way inside the menu items callback function to get the DOM object of the item that you right clicked on?

Tagging current version

When I installed the current version via Bower, it installed the latest commit, I think it would be very useful to tag the current version at the master branch.

Menu data reference

I have been fascinated by the beauty of Context.js. However, it is not clear for me how to get the information from the clicked element. Lets say I have an anchor that has some data attributes like this:

< a data-id="10" data-made="2014" data-type="car" data-color="red" href="#" >Ferrari< /a >

How can I get those data stuff?

I tried to use (this), but it returns the context menu itself.

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.