is it possible to re-create a zoom-like effect for dialogs in jquery without needing to download a lightbox plugin?
i'd like to add animation to my dialogs to simulate the "zoom" effect found on this page when you click on one of the images.
without needing yet another plugin, can this be done with jQuery out of the box? would love to be able to have dialogs (modal) animate from a specific point on the screen which the user has clicked (say a button or link) into a bigger container with the appropriate content - a zoom overlay effect?
any help is greatly appreciated...
Edited:
$(function() {
$("#testdialog").dialog({
autoOpen: false,
minWidth: 425,
minHeight: 300,
position: ['center', 115],
resizable: false,
modal: true
});
$("#opener").click(function () {
$("#testdialog").dialog("open").position();
return false;
});
});
[div id="testdialog"] some content here [/div]
[input type="button" id="opener" /]
See example of the following here.
One way you can accomplish this is to perform the transition you desire and then open the dialog in the callback function at the end of the animation. So, let's say you have an unordered list of equal sized thumbnails, you can make a
div
that's a white box and use jQuery to position it over whichever thumbnail you click. You'd then begin an animation towards the center of the viewport, and perhaps resize the div, and then in the callback at the end of this animation you can launch the dialog pro grammatically. I'm not too familiar with jQuery UI dialog, so you'll have to read the API docs for how to do this.