jQuery left and right mouse button custom menu code
var clicked = function() { alert('Item clicked!') }
var items = [
{ title: 'Add Sites', icon: 'ion-plus-round', fn: clicked },
{ title: 'Reset Login', icon: 'ion-person', fn: clicked },
{ title: 'Help', icon: 'ion-help-buoy', fn: clicked },
{ title: 'Disabled', icon: 'ion-minus-circled', fn: clicked, disabled: true },
{ title: 'Invisible', icon: 'ion-eye-disabled', fn: clicked, visible: false },
{ },
{ title: 'Logout', icon: 'ion-log-out', fn: clicked }
]
basicContext.show(items, e)
}
document.addEventListener('DOMContentLoaded', function() {
document.querySelector('a.click').addEventListener('click', onClick)
document.querySelector('a.context').addEventListener('contextmenu', onClick)
document.querySelector('a.touchend').addEventListener('touchend', onClick)
})
All resources on this site are contributed by netizens or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this site are for learning reference only. Please do not use them for commercial purposes. Otherwise, you will be responsible for all consequences! If there is any infringement, please contact us to delete it. Contact information: admin@php.cn
Related Article
11 Dec 2020
How jquery distinguishes left or right mouse clicks: You can use the [event.which] attribute to distinguish right clicks. The [event.which] attribute returns which keyboard key or mouse button was pressed on the specified event. The code is [switch (event. which)].
07 Jan 2024
Linux left and right mouse button swap script. The author used GNOME today and found that Linux also needs one of these tools, so he came up with this script. Very simple and easy to use. lr="l"foridin`xinputlist|grep"pointer"|sed-r's/.*id=([0-9]+).*/\1/'`;doif[[$lr=="r"] ]thenxinput--set-button-map$id1232>/dev/nullelsexinput--set-button-map$id3212
16 May 2016
This article introduces and demonstrates the example code for disabling the left and right mouse buttons on a web page. Friends in need can refer to it.
16 May 2016
This article mainly introduces the relevant information of realizing the sliding of the slider by dragging the mouse left and right based on jquery. The source code download is attached. Friends in need can refer to it.
16 May 2016
This article mainly introduces jquery's code to implement a secondary menu effect that slides out left and right like a fence. It involves jquery mouse click events and related techniques for dynamic operation of page elements. It is of great practical value. Friends who need it can refer to it.
26 Apr 2023
In front-end development, we often need to use jQuery to handle some interactive effects and animation effects, such as animation effects when the mouse is hovering, animation effects when the page is loading, etc. But sometimes we need to set a delay time so that these effects can be better expressed. So, how does jQuery set a delay? This article will introduce this issue in detail. 1. Delay method in jQuery In jQuery, delay effect can be easily achieved by using the delay() method. The delay() method can be used
16 May 2016
jQuery UI CSS Framework is a style framework in jQuery UI. You can use jQuery Theme roller to generate the css style effects you want. We can use some frameworks of jQuery UI to develop plug-ins based on jQuery UI CSS Framework effects.
23 May 2023
With the popularity of the Internet, the application of typing effects is becoming more and more widespread, and jquery typing effects have become the first choice of many website developers. However, in the process of realizing this special effect, detailed issues often affect the user experience, such as the problem of deletion of typing special effects. This article will introduce how to use jquery typing effects to stop deletion and improve the user's browsing experience. The implementation of jquery typing effects can use ready-made plug-ins, such as typed.js and jQuery.Typewriter. These plug-ins are based on jquery
16 May 2016
animate() is a method in jquery that can be used to create animation effects. The animate() method in jquery adds good visual effects to that page.
Hot Tools
jQuery2019 Valentine's Day Confession Fireworks Animation Special Effects
A very popular jQuery Valentine's Day confession fireworks animation special effect on Douyin, suitable for programmers and technical geeks to express their love to the girl they love. No matter you choose to be willing or not, you have to agree in the end.
layui responsive animated login interface template
layui responsive animated login interface template
520 Valentine's Day confession web animation special effects
jQuery Valentine's Day Confession Animation, 520 Confession Background Animation
Cool system login page
Cool system login page
HTML5 tape music player-CASSETTE PLAYER
HTML5 tape music player-CASSETTE PLAYER