Get support for jcubic/jquery.draglessClick
If you're new to LTH, please see our FAQ for more information on what it is we do.
Qualified Helpers
jcubic/jquery.draglessClick
jquery.draglessClick
Better jQuery click event that's not invoked when you drag or select text
Usage:
$(function() {
$('p').on('draglessClick', function handler(e) {
// e is real click event from browser
alert("You've really clicked this item");
$(this).off('draglessClick', handler);
});
$('.container').on('draglessClick', 'ul li', function() {
alert("You've clicked on li element");
});
});
draglessClick
event use mousedown, mouseup and click events added to element and mousemove added to windows object.
NOTE: names of the events in jQuery are case sensitive so draglessclick will not work.
Demo
https://codepen.io/jcubic/pen/QZxRLd
License
Released under MIT license
Copyright (c) 2018 Jakub T. Jankiewicz
Our Mission
We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.
From the Blog
Interesting Articles
-
Generating income from open source
Jun 23 • 8 min read
-
2023 State of OSS
Apr 23 • 45 min read ★
-
A funding experiment...
Aug 19 • 10 min read
-
But You Said I could
Aug 19 • 2 min read
Thank you for checking out LiveTechHelper |
2024 © lth-dev incorporated
p-e622a1a2