Activate your free membership today | Log-in

Friday, October 16th, 2009

jQuery Approach; Creep up on your radials

Category: jQuery

We have featured the creative work of Scott Robbin many times before. This time he comes at us with a cool new jQuery Approach plugin.

It works very similar in nature to animate, except it's based on distance instead of time. As the user's cursor approaches an element, more of an animated style's value is applied, proportional to the radial distance.

He has fun demos that show that lighting up the world is as easy as:

JAVASCRIPT:
  1.  
  2. $("#wrap img").approach({
  3.     "opacity": 0.8
  4. }, 100);
  5.  

jqueryapproach

Posted by Dion Almaer at 6:30 am
11 Comments

++---
2.7 rating from 79 votes

11 Comments »

Comments feed TrackBack URI

With the slew of new JS libraries and effects, I’m constantly reminded of the early Flash days. It won’t be long ’til we’ve got animated splash pages with sound and 3D menu systems again! All using HTML 5’s audio tag, a drawing library (eg., Raphael) and jQuery! Wee!

Comment by MichaelThompson — October 16, 2009

I’m a fan of the Proximity plugin myself.
http://edeverett.co.uk/jqueryproximity-plugin

Comment by igaenssley — October 16, 2009

Thanks Ian.

The plugins do do similar stuff. My Proximity plugin seems to be a bit more generalised than Approach, so hopefully they should be complementary.

It seems that the biggest difference is between the two is that Proximity leaves what to do with the distance information entirely up to the developer.

Anyway it’s all good stuff to see. Hopefully there’s a lot more fun and subtlety to be had from website user experiences yet.

Comment by edeverett — October 16, 2009

$.each and mousemove? I stopped reading there.

Rule #1 of jQuery – don’t use it for any fast timer or event. And don’t use recursive bullshit like $.each ever.

That, my friend, is why it uses 100% CPU (Firefox).

Comment by Darkimmortal — October 16, 2009

“don’t use it for any fast timer or event.”
.
Of course performance will be an issue for plugins doing this kind of stuff. They should be used with caution and awareness of your target audience. But for me that’s a pre-condition of using jQuery or Javascript at all.
.
I’d be very interested to hear people’s constructive ideas on increasing performance as it’s not an area I know much about. Both plugins throttle the rate at which they use the mousemove events which goes a long way to making performance acceptable.

Comment by edeverett — October 16, 2009

Store references to any elements you’re likely to be using (there’s probably some silly reason not to, but meh), use for loops (no recursive $.each) and do as much as possible with hard coded DOM manipulation or lighter animation libraries than jQuery’s built in one (GX is awesome).

Comment by Darkimmortal — October 16, 2009

How is $.each recursive?

Comment by eyelidlessness — October 18, 2009

@edeverett
“But for me that’s a pre-condition of using jQuery or Javascript at all.”
.
You can do pretty impressive stuff with JS/DHTML and have it running even on most mobile devices. I don’t know the CPU demands of jQuery, but we do stuff – and I’ve seen others do stuff – that’s pretty jaw-dropping, and runs perfectly on my [old] iPhone even too…

Comment by ThomasHansen — October 18, 2009

Thanks!
it’s very funny plugin!!

Comment by 1234567890qwert — October 19, 2009

This is pretty neat. Not to steal it’s thunder or anything, but here’s a neat little pre-pre-pre-alpha demo of how to do something similar in MooTools.

You can drag the box.

http://mooshell.net/Ytdye/

Comment by SubtleGradient — October 21, 2009

GH337, as a digital mobile phone, empire wedding dresseswhether it is performance or other aspects are much better than the analog phones could also say that empire waist wedding dresseswas the fashion trend.Ericsson T68: the first color screen mobile phone Ericsson T68 was launched in the finalstrappless empire waist wedding dresses of a cell phone, but also a location in the high-end mobile phones, evening formal dressesit is the emergence of the mobile phone world has become Behind colorful.Ericsson GH398: Custom ring tones plus size evening dressescan be the first mobile phone Ericsson has brought unconventional way this could be composing cheap flower girl dresses ringtones GH398,Unfortunately, mobilephones have not yet popular in that era, which ended in failure.Ericsson T39mc: wedding dressthe first built-in Bluetooth-enabled mobile phone August 2001 Ericsson released the world’s first built-in Bluetooth chip for mobile phones T39mc,Empire Halter Satin WeddingDresswhich is Ericsson’s first tri-band GSM and GPRS high-speed Internet-ready phones.Ericsson R250 PRO: the first three anti-cell phonewedding dressR250 PRO is the first with a waterproof,Empire Halter Chiffon Wedding Dress shockproof, dust-proof function of the “three defenses” outdoor-type mobile phone. It is in the third quarter of 1999 to the market.

Comment by wuwei — November 9, 2009

Leave a comment

You must be logged in to post a comment.