ZenphotoCMS Forum
Script.aculo.us effects not working with zenJavascript(); call?? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Script.aculo.us effects not working with zenJavascript(); call?? (/thread-4565.html)



Script.aculo.us effects not working with zenJavascript(); call?? - drunkmunkee - 2009-01-30

Howdy all,
I'm pulling out my hair trying to get the script.aculo.us toys to work with my ZenPhoto installation. I've been working at this problem for over 5 hours now, with no resolution. When I try to do an effect to reveal the commenting section, the link doesn't work! The only way I can get this to work as advertised is by deleting the following line from my head section:

If I delete that line, the following code works perfectly. However, when I delete it, bad stuff happens elsewhere! As long as that code remains in my head section, my effects code is dead-in-the-water. Any suggestions??

Here's my script:

Effect.OpenUp = function(element) {
element = $(element);
new Effect.BlindDown(element, arguments[1] || {});
}

Effect.CloseDown = function(element) {
element = $(element);
new Effect.BlindUp(element, arguments[1] || {});
}

Effect.Combo = function(element) {
element = $(element);
if(element.style.display == ‘none’) {
new Effect.OpenUp(element, arguments[1] || {});
}else {
new Effect.CloseDown(element, arguments[1] || {});
}
}

I'm calling it with the following link:

add comment

Which should make this visible:

...
...




Script.aculo.us effects not working with zenJavascript(); call?? - acrylian - 2009-01-30

You did not say which Zenphoto version... Anyway, Zenphoto uses jQuery and the next version (and the current nightly/svn already now) dropped everything that was script.aculo.us related now (like the backend album sorting). There might be a conflict with jQuery.




Script.aculo.us effects not working with zenJavascript(); call?? - drunkmunkee - 2009-01-30

I am running zenphoto version 1.2.2 [2983].

Is there any way to convert this to something that would work with script.aculo.us? Script.aculo.us seems to be included with ZenPhoto in the zp-core/js directory. Am I missing something here? Do you know how to make this work somehow? Basically, I'm just trying to get the comments section to hide/unhide. You can check out what I currently have at:

http://www.aggiesterlings.com




Script.aculo.us effects not working with zenJavascript(); call?? - sbillard - 2009-01-30

Scriptaculous is still part of the 1.2.2 release, so that is not your problem. However, since what you are trying does not work and scriptaculous will be dropped from the next release (coming soon) you should probably find a jQuery plugin to do what you want.




Script.aculo.us effects not working with zenJavascript(); call?? - acrylian - 2009-01-31

jQuery already features standard toggle/hide functions, no plugin necessary. Please refer to the jQuery site.