View Full Version : CMotion Image Gallery & Facebox image and content viewer (v 1.1) not working together

04-04-2013, 07:49 AM
1) Script Title:
CMotion Image Gallery

2) Script URL (on DD):

3) Describe problem:
the CMotion Image Gallery scroll function dont work while on the same page as the Facebox image and content viewer (v 1.1
basically made a facebox "popup gallery" with the Cmotion to scroll the thumbnails. you can click/enlarge thumbnail but cannot
browse through them:confused:

04-04-2013, 08:32 AM
Cmotion will not initialize unless it's content is on the page and not CSS style display: none; at page load.

Depending upon how you're using Facebox to deliver CMotion content, one or both of these conditions might not be being met. Probably in fact, it just depends upon how you're using Facebox, as to which or both that it is.

There's a workaround regardless of what the problem is, though in some cases a different script than CMotion and/or Facebox might be advisable.

Rather than guess at the particular Facebox method you are using (AJAX or on page div) and give general instructions for dealing with either, which would probably require me to make up demos for each:

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

04-04-2013, 08:56 AM
you click a textlink that pops up Facebox(external page) with Cmotion on the page

if post a link it will be to an adult site:o

04-04-2013, 10:07 AM
Then provide a simplified demo page with all the adult content removed ;)

04-04-2013, 03:02 PM
AJAX doesn't reliably bring along scripts from imported content. Even when it does, it doesn't fire onload events from that content without being told to. There is no onload event with AJAX and CMotion requires one. And it must not fire until the images in the CMotion 'train' are loaded. Without seeing it, I'd say the easiest way would be to use EasyBox instead of Facebox:


With EasyBox you can use an iframe instead of AJAX to fetch the content. Then CMotion will work as expected.

Even if I had it to play around with, I'm like 99% sure CMotion would need to be replaced in order to reliably work on AJAX import.

If you were to use Facebox's on page div method, it could work out with some modifications to at least Facebox. But then, if you have more than one CMotion import, that would not work. If that could be overcome, there would be a load time issue with so many images on one page.

All things considered, using EasyBox with its iframe option looks like the best choice.

04-05-2013, 03:38 AM
hello, thank you two for the responses
good point on AJAX, and yes i'll try the EasyBox

thank you

04-06-2013, 12:01 AM
Lovely, thanx again
yea the easyBox worked much much better