View Full Version : Together do not work

10-09-2007, 03:15 PM
1) Script Title: CMotion Image Gallery + Animated Collapsible DIV

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm

3) Describe problem: Im using both DD Scripts on my project but when I put the motioncontainer and motiongallery (DIVs from CMotion Image) inside the "cat" (DIV from Animated Collapsible), for example, the motiongallery don't hide in IE6.:confused:. I've changed some CSS functions from CMotion Image like: position, float, visibility, but nothing happen.

Take a look:
http://img250.imageshack.us/img250/3339/divoutur0.th.jpg (http://img250.imageshack.us/my.php?image=divoutur0.jpg)

Someone could give me a little help.

10-16-2007, 02:05 PM
The solution for my little problem called: iFrame!

When I created it inside the "cat" div, everything worked fine!

10-16-2007, 09:39 PM
Some folks don't like iframe. Here's a version of Cmotion:


that can do multiple instances on a page and that should 'play nice' with other scripts.

05-26-2010, 11:11 PM
Sorry I'm drudging this post up from a few years ago.

I've tried to use the animated div and cmotion together, even tried the cmotion object oriented code provided above.

The problem I'm encountering is that the Cmotion won't scroll if I load the page with the gallery's div hidden. If I leave it open, it loads fine and scrolls fine.

I've been searching and trying to debug for hours, still have no solution.

Can anyone help?

05-27-2010, 06:05 AM
Hidden (css: visibility: hidden; or scripted: .style.visibility = 'hidden';) should be OK. Display none (css: display: none; or scripted: .style.display = 'none';) would not. When an element or its parent is display none, the browser cannot calculate its dimensions, something that is essential for Cmotion and many other scripts.

However, using visibility hidden will not take the content out of the flow of the page, leaving a gap (possibly a big one) when whatever is hidden cannot be seen. But there is a solution. One can make the visibility hidden, the position absolute, and, using negative left and right style properties, position the element off the page to the top and left (where it will not cause scrollbars for the page). Then when you want it to be seen, set its position to static and visibility to visible.

05-27-2010, 04:22 PM
Spectacular John, worked like a charm.
Thanks for your help.