views:

137

answers:

4

This is just a thought that I'm having, and I'm curious if its possible.

For instance, say I have a div with text and an image within. I'd like to be able to click a button and have the top pinch inwards...basically as though I'm compressing it into a singularity.

Is this sort of transformation possible?

+1  A: 

I believe these kinds of effects are only achievable through the use of either Flash, Silverlight or SVG.

Paul Suart
+1  A: 

Have a look at jQuery UI's effects: http://jqueryui.com/docs/show/

Kobi
A: 

I don't think it would be easier to do this sort of thing using javascript only. Even if it could be done it would be an overkill.

The closest thing I can remember to do this are IE specific filters and transitions. But need to remember that these are IE only.

Your best choice will be Flash in which these sort of things are comparatively easier.

rahul
+3  A: 

jQuery doesn't support it, but maybe some other JavaScript libraries like Raphaël could get you started:

Raphaël is a small JavaScript library that should simplify your work with vector graphics on the web. If you want to create your own specific chart or image crop and rotate widget, for example, you can achieve it simply and easily with this library.

Raphaël uses the SVG W3C Recommendation and VML as a base for creating graphics. This means every graphical object you create is also a DOM object, so you can attach JavaScript event handlers or modify them later. Raphaël’s goal is to provide an adapter that will make drawing vector art compatible cross-browser and easy.

Raphaël currently supports Firefox 3.0+, Safari 3.0+, Opera 9.5+ and Internet Explorer 6.0+.

Arjan
Raphaël definitely looks interesting...I think I may need to go ahead and use it with a different project that I'm working on!
espais