Activate your free membership today | Log-in

Thursday, July 16th, 2009

Swipe away, then quickly flip with simple jQuery plugins

Category: iPhone, jQuery

Ryan Scherf has created a simple jQuery plugin that "uses Mobile Safari's built in touch events to allow jQuery binding of swipe events to any DOM element. You can override the swipeLeft and swipeRight defaults functions to create your own custom process when the gesture is detected."

It can be used as simple as:

JAVASCRIPT:
  1.  
  2. $('.swipe').swipe({
  3.      swipeLeft: function() { $('#someDiv').fadeIn() },
  4.      swipeRight: function() { $('#someDiv').fadeOut() },
  5. })
  6.  

You can tweak the threshold for the swipe, and take a peak at the demo which is shown here:

Jon Raasch has also updated his QuickFlip plugin that flips any piece of HTML like a card. The flip effect is similar to the UI animation on the iPhone, and uses an animation trick that is barely noticeable when fired quickly.

QuickFlip 2 resolves a number of usability and performance issues in
QuickFlip. The $.quickFlip() function can now be chained from any
jQuery selector, attaching all the styling and markup it needs
automatically. Additionally a new $.quickFlipper() function makes
triggering the flip effect a piece of cake. Other than that, minor
bugs have been fixed and performance has been tuned.

For more info:

Posted by Dion Almaer at 6:22 am
2 Comments

++---
2.2 rating from 38 votes

2 Comments »

Comments feed TrackBack URI

Open Web out the window then?

Comment by Darkimmortal — July 16, 2009

With the changing trend of the world, wedding apart from white,Princess Strapless Satin Evening Dress ivory, beige and other traditional colors,are also increasingly popular in recent years, ghetto prom dressespink wedding package,gothic prom dresses such as pink, pink orange, baby blue, purple night, light green and light silver-gray, very soft and pleasing to wedding hair accessoriesthe eye; if you have the courage to try, dark green, purplish red, deep purple, decorated in pink wedding dress, the formation of rich colors,the dress, the effect is very special;Sash Lace Satin Flower Girl Dress, laden with flour colored silk flowers, butterflies, in order to add color.wedding dressIn fact, the wedding is the color of lesser importance, the most important prerequisite is to match the bride’s complexion. Oriental deep and yellowish color, wearing white Mermaid Satin Organdie Wedding Dress,will appear dull, wearing ivory would be more harmonious and natural, baby blue, wedding accessoriespurple night can not be coordinated with the yellow, but pink orange, light green with yellowish color match. As for the skin and rosy, or bronze skin, wearing white will look great, wedding dress

Comment by wuwei — November 10, 2009

Leave a comment

You must be logged in to post a comment.