All Projects → tuxracer → touchclick

tuxracer / touchclick

Licence: MIT license
Provides immediate visual feedback on touch for native-feeling web apps

Programming Languages

javascript
184084 projects - #8 most used programming language
coffeescript
4710 projects
HTML
75241 projects

Projects that are alternatives of or similar to touchclick

Storybook Mobile
A storybook addon that helps you create truly mobile-friendly components
Stars: ✭ 93 (+121.43%)
Mutual labels:  ux, mobile-web
ReactZooApp
ReactZooApp
Stars: ✭ 33 (-21.43%)
Mutual labels:  ux
Framevuerk
Fast, Responsive, Multi Language, Both Direction Support and Configurable UI Framework based on Vue.js.
Stars: ✭ 252 (+500%)
Mutual labels:  ux
product-language-framework
A ready-to-go starter kit for product copywriting and style guidelines. Useful guidelines, examples, and an optional static site generator.
Stars: ✭ 20 (-52.38%)
Mutual labels:  ux
hurley
🎧 The Podcast Web Interface
Stars: ✭ 12 (-71.43%)
Mutual labels:  ux
ngx-vant
Lightweight Mobile UI Components built on Vant and Angular
Stars: ✭ 34 (-19.05%)
Mutual labels:  mobile-web
Sketchsheets
Free ready to print sketch sheet templates for UX designers
Stars: ✭ 241 (+473.81%)
Mutual labels:  ux
Scribble-Font
Scribble Font for Prototyping & Wireframing
Stars: ✭ 48 (+14.29%)
Mutual labels:  ux
microsoft-teams-faqplusplus-app
DEPRECATED - This repository contains a deprecated version of the FAQ Plus app template. Please see the README file for more details and a link to the new repository
Stars: ✭ 47 (+11.9%)
Mutual labels:  obsolete
website
Website source for Jikan.moe
Stars: ✭ 28 (-33.33%)
Mutual labels:  ux
mobile-scroll-events
📜 移动端滚动事件大起底!
Stars: ✭ 51 (+21.43%)
Mutual labels:  mobile-web
prestafony-project
Some resources to help you migrate PrestaShop to Symfony 3
Stars: ✭ 12 (-71.43%)
Mutual labels:  obsolete
roving-ux
stateful roving index for web ui
Stars: ✭ 110 (+161.9%)
Mutual labels:  ux
Typekit Cache
Keeps a site's Typekit in localStorage and injects it on page load, eliminating the Flash Of Invisible/Unstyled Text.
Stars: ✭ 251 (+497.62%)
Mutual labels:  ux
php.rb
[Retired] PHP.rb translates Ruby code into PHP code.
Stars: ✭ 86 (+104.76%)
Mutual labels:  obsolete
Browser Sec Whitepaper
Cure53 Browser Security White Paper
Stars: ✭ 251 (+497.62%)
Mutual labels:  ux
open-ui
Maintain an open standard for UI and promote its adherence and adoption.
Stars: ✭ 2,539 (+5945.24%)
Mutual labels:  ux
Windows11-betterUX
A non-destructive registry preset to improve the default user-experience with windows 10.
Stars: ✭ 21 (-50%)
Mutual labels:  ux
PrestaShopAutomationFramework
Framework for writing automated tests for PrestaShop
Stars: ✭ 18 (-57.14%)
Mutual labels:  obsolete
ui patterns
[NOTE] Development has moved to https://drupal.org/project/ui_patterns
Stars: ✭ 87 (+107.14%)
Mutual labels:  ux

⚠️ Note: This is no longer necessary, nor recommended for the latest versions of mobile browsers. See: https://webkit.org/blog/5610/more-responsive-tapping-on-ios/

touchclick

This is a small jquery plugin that allows you to easily bind to the touch or click events depending on what's available for the given platform. Unlike similar scripts, this also provides immediate visual feedback on touch platforms -- just as native apps do.

Getting Started

  1. Include the touchclick.js file on the page after jquery, or require it with browserify.

  2. Bind to the touchclick event where you would have otherwise used click or touchend

	$(".menu-btn").on("touchclick", function () {
		console.log("अनित्य");
	});
  1. Define a .touchactive style for the given element
	.menu.btn.touchactive {
		color: #eee;
		background-color: #333;
	}
  1. Disable the default touch overlay so it doesn't interfere with your custom .touchactive style
	* {
            -webkit-touch-callout: none;
            -webkit-tap-highlight-color: rgba(0,0,0,0);
        }
  1. (Optional) For delegated events add data-touchclick="true" to the element you want the touchactive class to be added to.
	<div class="menu btn" data-touchclick="true">Menu</div>

Traditional Solutions

Bind to touchend

Binding to touchend or using a script such as fastclick will remove the delay for triggering the event. However, unlike touchclick, they do not provide immediate visual feedback as native apps do.

Bind to touchend + provide a :hover style

Binding to touchend or using fastclick will remove the delay and provide some visual feedback. However, unlike touchclick and most native apps, when the user removes their finger from the element the :hover style sticks. While subtle, this still leaves web apps with a somewhat laggy feel.

Rely on tap-highlight-color

Some browsers will add a large translucent overlay when items are tapped. However you do not have control over the exact style of an actively pressed element. This typically ends up looking a bit janky.

License

Copyright (c) 2015, Derek Petersen

Licensed under the MIT license.

http://derek.cloud/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].