Giter VIP home page Giter VIP logo

rclick.js's Introduction

rClick.js bower-image

This plugin enables you to use jQuery to attach events triggered by the right mouse button. Three right-click events are supported: click, mouseup, and mousedown. There is also a built-in method to disable browser context menus.

Installation

bower install rClick.js 

Usage

$(function () {

    $(window).rClick({
        click: 'right',
        element: $('#tooltip'),
        delay : 100
    });

})
<div id="tooltip" class="hidden">
    <ul>
        <li><a href="#">Contact information</a></li>
        <li><a href="#">Select message</a></li>
        <li><a href="#">Quiet</a></li>
        <li><a href="#">Clear message</a></li>
        <li><a href="#">Delete chat</a></li>
    </ul>
</div>
.hidden {
    display: none;
}

#tooltip {
    border-left: 1px solid #d2cece;
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #aba8a8;
    border-right: 1px solid #d4d1d1;
    border-radius: 5px;
    background: #efefef;
    -moz-box-shadow: 1px 1px 25px rgba(0, 0, 0, 0.2);
    box-shadow: 1px 1px 25px rgba(0, 0, 0, 0.2);
}

#tooltip ul {
    padding: 0;
}

#tooltip ul li {
    padding: 12px 30px 12px 20px;
}

#tooltip ul li a {
    display: block;
    text-decoration: none;
    color: #444;
    font-size: 14.5px;
    cursor: pointer;
    text-align: left;
}

#tooltip ul li:hover, #tooltip ul li.active {
    background: #d8d8d8;
}

Demo

web.whatsapp

demo-image

hublabs.rclick.js

demo-image-2

rclick.js's People

Contributors

ufukozarslan avatar hublabsturkey avatar

Watchers

James Cloos avatar  avatar

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.