How can you make FancyBox draggable?

2,916 views
Skip to first unread message

gimper...@gmail.com

unread,
Mar 30, 2009, 8:59:57 PM3/30/09
to fancybox
I noticed that some other lightbox are draggable, is there any way to
do the same for fancybox?

gimper...@gmail.com

unread,
Apr 2, 2009, 11:46:28 AM4/2/09
to fancybox
??

On Mar 30, 8:59 pm, "gimperdan...@gmail.com" <gimperdan...@gmail.com>
wrote:

JFK

unread,
Apr 23, 2009, 6:38:28 PM4/23/09
to fancybox
well, yes and no

fancybox doesn't include draggable feature .... but yes, there is a
workaround using another jQuery plugin along with fancybox; see demo
at: http://jquery.diaz-cornen.com/fancybox/index_dragfancybox.html

and yes, it does work in IE6 if anybody wonders

On Apr 2, 8:46 am, "gimperdan...@gmail.com" <gimperdan...@gmail.com>
wrote:

daniel

unread,
May 24, 2012, 6:49:32 PM5/24/12
to fanc...@googlegroups.com
Hi is there as of now a way to make a fancybox draggable , I'm using Fancybox 2.0 and I passed the last 2 days looking for a way to do it... seems that it's feasible with JQuery UI but I didn't found anything clear 'bout it..... easdrag plugin is working only with older version of fancy box... there is a bunch of plugin using Jquery to create the drag effect but no clue on how to merge it with a fancybox....
please help.... :'|

Mar Ventus

unread,
May 24, 2012, 10:19:27 PM5/24/12
to fanc...@googlegroups.com
Hi there. You should definitely look into jQuery UI, more particularly, the draggable function.
You would need to include all the necessary JS scripts in the head or footer (preferably) of your document, and then call draggable on the fancybox elements you wish to turn draggable.
Cheers!



--
You received this message because you are subscribed to the Google Groups "fancybox" group.
To view this discussion on the web visit https://groups.google.com/d/msg/fancybox/-/tC9kRFE2o-MJ.
To post to this group, send email to fanc...@googlegroups.com.
To unsubscribe from this group, send email to fancybox+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fancybox?hl=en.

JFK

unread,
May 28, 2012, 4:56:28 PM5/28/12
to fancybox
Ok, you may try with the easyDrag plugin:
http://fromvega.com/code/easydrag/jquery.easydrag.handler.beta2.js

You may need to use the "handler" feature to avoid buggy behavior
Check the detailed explanation (for v1.3.4 though but the principle is
the same) here:
http://stackoverflow.com/a/10781937/1055987

For fancybox v2.x bind the plugin to the selector with class "fancybox-
wrap" like
$(".fancybox-wrap").easydrag();
and append the handler to the same selector using the afterLoad
callback

hope it helps

On May 24, 7:19 pm, Mar Ventus <marventus...@gmail.com> wrote:
> Hi there. You should definitely look into jQuery UI, more particularly, the
> draggable <http://jqueryui.com/demos/draggable/> function.
> You would need to include all the necessary JS scripts in the head or
> footer (preferably) of your document, and then call draggable on the
> fancybox elements you wish to turn draggable.
> Cheers!
>
>
>
>
>
>
>
> On Thu, May 24, 2012 at 7:49 PM, daniel <toda...@gmail.com> wrote:
> > Hi is there as of now a way to make a fancybox draggable , I'm using
> > Fancybox 2.0 and I passed the last 2 days looking for a way to do it...
> > seems that it's feasible with JQuery UI but I didn't found anything clear
> > 'bout it..... easdrag plugin is working only with older version of fancy
> > box... there is a bunch of plugin using Jquery to create the drag effect
> > but no clue on how to merge it with a fancybox....
> > please help.... :'|
>
> > On Friday, April 24, 2009 1:38:28 AM UTC+3, JFK wrote:
>
> >> well, yes and no
>
> >> fancybox doesn't include draggable feature .... but yes, there is a
> >> workaround using another jQuery plugin along with fancybox; see demo
> >> at:http://jquery.diaz-cornen.com/**fancybox/index_dragfancybox.**html<http://jquery.diaz-cornen.com/fancybox/index_dragfancybox.html>

daniel

unread,
Jun 1, 2012, 6:11:17 AM6/1/12
to fanc...@googlegroups.com
Hi,
Thank you for your answer but I couldn't get it to work, I tried with the different classes (wrap, inner, outer, ...) but no luck till now, the handler doesn't even show himself on the pic...
If you could give me an example that works on FB2.0 it would be much appreciated.
Either way thank you very much for everyone's help.
Excellent Group, very helpful !
> > fancybox+unsubscribe@googlegroups.com.

Dennis Enggsol

unread,
May 31, 2013, 5:33:10 AM5/31/13
to fanc...@googlegroups.com
instead of using afterLoad, you should use afterShow like this:

afterShow: function(){
        $("div.fancybox-wrap").easydrag();
> > fancybox+u...@googlegroups.com.

JFK

unread,
May 31, 2013, 8:15:26 PM5/31/13
to fanc...@googlegroups.com
@dannis : you are correct, this is actually what I said here http://stackoverflow.com/a/10781937/1055987 but for any reason I wrote "afterLoad" here , my bad
Reply all
Reply to author
Forward
0 new messages