Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
tap.js-tmp
Advanced tools
`Tap` is a Javascript library for easy unified handling of user interactions such as mouse, touch and pointer events.
Readme
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
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 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 tap.js-tmp receives a total of 0 weekly downloads. As such, tap.js-tmp popularity was classified as not popular.
We found that tap.js-tmp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.