반응형
반응형

jQuery UI Touch Punch

Touch Event Support for jQuery UI

 

Tested on iPad, iPhone, Android and other touch-enabled mobile devices.

 

 

http://touchpunch.furf.com/

 

https://github.com/furf/jquery-ui-touch-punch

jQuery UI Touch Punch is a small hack that enables the use of touch events on sites using the jQuery UI user interface library.

Currently, jQuery UI user interface library does not support the use of touch events in their widgets and interactions. This means that the slick UI you designed and tested in your desktop browser will fail on most, if not all, touch-enabled mobile devices, becuase jQuery UI listens to mouse events—mouseover, mousemove and mouseout—not touch events—touchstart, touchmove and touchend.

That's where jQuery UI Touch Punch comes in. Touch Punch works by using simulated events to map touch events to their mouse event analogs. Simply include the script on your page and your touch events will be turned into their corresponding mouse events to which jQuery UI will respond as expected.

As I said, Touch Punch is a hack. It duck punches some of jQuery UI's core functionality to handle the mapping of touch events. Touch Punch works with all basic implementations of jQuery UI's interactions and widgets. However, you may find more complex cases where Touch Punch fails. If so, scroll down to learn how you can file and/or fix issues.

This code is dual licensed under the MIT or GPL Version 2 licenses and is therefore free to use, modify and/or distribute, but if you include Touch Punch in other software packages or plugins, please include an attribution to the original software and a link to this Touch Punch website.

Download the Code

The jQuery UI Touch Punch plugin is available in two versions:

* minified & gzip'd

 

 

Using Touch Punch is as easy as 1, 2…

Just follow these simple steps to enable touch events in your jQuery UI app:

  1. Include jQuery and jQuery UI on your page.

    <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
    <script src="http://code.jquery.com/ui/1.8.21/jquery-ui.min.js"></script>
    
  2. Include Touch Punch after jQuery UI and before its first use.

    Please note that if you are using jQuery UI's components, Touch Punch must be included after jquery.ui.mouse.js, as Touch Punch modifies its behavior.

    <script src="jquery.ui.touch-punch.min.js"></script>
    
  3. There is no 3. Just use jQuery UI as expected and watch it work at the touch of a finger.

    <script>$('#widget').draggable();</script>
    
 

반응형
반응형

Trianglify: Generate colorful triangle meshes

Trianglify is a JavaScript library that lets you create colorful triangle meshes automatically, which you can then use as CSS backgrounds, or SVG images. There are controls for noise, cell size, and cell padding, and of course the whole thing is open source.

trianglify

Trianglify

Trianglify is a library that I wrote to generate nice SVG background images like this one:

example

It was inspired by btmills/geopattern, and uses d3.js to build the polygons and SVG and SVG filters for rendering. It also includes the colorbrewer color palette library to get you up and running quickly. It was written in a single day because I got fed up with Adobe Illustrator.

Demo:

Official: http://qrohlf.com/trianglify

nixterrimus also made a nice demo app: link (source)

반응형
반응형

 

scrollToBySpeed: Scroll windows by speed instead of duration

 

scrollToBySpeed is a jQuery plugin that lets your users scroll by speed rather than duration, giving a more consistent user experience. Regardless of how far down the page something is, when a user clicks a navigation button that triggers a scroll, the speed will be consistent.

scroll

반응형
반응형

Sticky Alerts: A tiny sticky alert bar plugin

 

Sticky Alerts is a tiny jQuery plugin (only 36 lines of JavaScript!) for adding sticky alert bar to your website. It’s easy to set up and has a few options for customizing it for your site.

sticky alerts

 

 

 

 

 

 

 

.

반응형
반응형

FastClick: Eliminate lag in mobile browsers

 

 

FastClick aims to eliminate the 300ms lag between a physical tap and the actual “click” event in mobile browsers. This makes your site feel much more responsive and less laggy, without interfering with your site’s current logic.

fastclick

.

반응형
반응형

jQuery fontIconPicker: Add an icon picker to your admin forms

The jQuery fontIconPicker makes it simple to add an icon picker and search function to your administration forms. It can be triggered on a SELECT or TEXT input, and has multiple usage options.

아이콘 셀렉트/콤보 버튼, 선택  -  http://codeb.it/fonticonpicker/

iconpicker

jQuery fontIconPicker is a small (1.58kb gzipped) jQuery plugin which allows you to include a simple icon picker with search and pagination inside your administration forms. 

 

 Legend:

 How it works
 Basic: Load from SELECT input field
 Load from TEXT input field (no empty icon, no search)
 Load icons from Fontello JSON config file
 fontIconPicker validation
 Change icon set on the fly
 Trigger event on icon change
 ACF { fontIconPicker WordPress plugin
 Browser compatibility
 Credits

 

 

 

반응형

+ Recent posts