![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
`Tap` is a Javascript library for easy unified handling of user interactions such as mouse, touch and pointer events.
Tap
is a Javascript library for easy unified handling of user interactions such as mouse, touch and pointer events.
Tap
handles this for youIf you are using Bower:
bower install tap
For npm users:
npm install tapjs
Otherwise just download the library.
Include it anywhere in your html file (it does not matter where — in <head>
or not):
<script src="bower_components/tap/dist/tap.min.js"></script>
Using Tap
is super easy. Just handle the 'tap' event in a way you are familiar with:
document.getElementById('any-element').addEventListener('tap', function (e) {
// All the magic happens here
});
$('#any-element').on('tap', function (e) {
// All the magic happens here
});
$('#any-element').on('tap', function (e) {
// All the magic happens here
});
var myButton = dojo.byId('any-element');
dojo.connect(myButton, 'tap', function(e){
// All the magic happens here
});
YUI().use('event', 'node', function (Y) {
Y.one('#any-element').on('tap', function(e) {
// All the magic happens here
});
});
Ext.get('any-element').on('tap', function (e) {
// All the magic happens here
});
First, install Meteor package:
meteor add jimbog:tap
Then, the tap event is used just like any other event in Meteor, here is an example for an anchor element:
Template.MyTemplate.events({
'tap a': function(evt, tmpl){
evt.preventDefault();
console.log('you tapped the link');
}
})
Just add the code below or dist/tap.angular.js
to your project, and use ng-tap
insted of ng-click
. Do not forget add ngTap
as a dependency.
angular.module('ngTap', []).directive('ngTap', function() {
return function(scope, element, attrs) {
element.bind('tap', function() {
scope.$apply(attrs['ngTap'], element);
});
};
});
tap
is not in the list of known events for Knockout, so use custom event binding to handle tap
event:
<button data-bind="event: {tap: onAddToCart}">Add to cart</button>
Tap was tested on the wide range of devices:
And browsers:
It doesn't mean that all other platforms and browsers (or older versions of them) are not supported.
Tap is distributed under MIT license. Enjoy!
FAQs
`Tap` is a Javascript library for easy unified handling of user interactions such as mouse, touch and pointer events.
The npm package tapjs receives a total of 0 weekly downloads. As such, tapjs popularity was classified as not popular.
We found that tapjs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.