I`m new here, i know html & css but i`m a total stranger to javascript & its libraries.
BUt i found once a very cute thing on an old Joomla Bamboo template for joomla, and because i got the "tadaam - cool!" reaction from ppl i shown it to, i want to be able to replicate it in an normal html website.
I was able to replicate it on a joomla site a while ago, just for testing, but now i`m unable to do so and i`m stuck.
Fx.Slide is undefined, so it seems you're missing a JavaScript library. My guess is that mootools-more.js is missing after comparing the two pages, as it looks like Fx.Slide is defined in that file.
and downloaded the mootools-more thing, with everything on it, plus the 125 version, cuz the effect when found was a few years back, added them, still nothing happens
Well, the Fx.Slide problem is fixed but now the console reveals that addEvent is undefined. (Always check the console!) There is a conflict between jQuery and MooTools: the global $ is the jQuery library and not MooTools, thus the addEvent method does not exist. (jQuery doesn't have that method.) Try calling jQuery.noConflict() right before your script (or simply don't include the jQuery library if you don't use it... It seems kinda overkill to have both libraries, right?)
i`ll try my best to understand what you`re saying. You`re most probably right, but i`m really at zero with javascript. promised myself i`ll get a book to learn it right from the start, but stuff keeps getting in the way...
So i have no idea what the console is or how to call jQuery.noConflict()
But i`ll try to remove the jquery ones, see what happens, and be back...
ok, i went and changed the script with the code you provided with "no conflict"
in v4 i added the jqueries libraries also again, i v5 i removed them again. but both v4 or v5 don`t do anything
The addEvent error is fixed by including MooTools before jQuery in v5, but nothing is still happening. No errors or anything. Now I don't know what's wrong, sorry. :S
Now the only issue left is that it just slides, without doing the "bouncing" also... like here: http://joomla-love.com/j-m-charm/
What can be wrong in there?
Fx.Transitions.bounceOut is undefined this time, so I'm guessing it uses a standard sliding transition instead of bouncing. I can't find in what file it is defined on that original page after a quick search, but my guess is that it's missing from mootools-yui-compressed.js.
I have re-read the page like for 10th time, and it says:
Fx.Transitions Method: bounce
Makes the transition bouncy. Must be used as Bounce.easeIn or Bounce.easeOut or Bounce.easeInOut.
but in my code it jus says:
Code:
transition: Fx.Transitions.bounceOut
but that is how it was in the original template, that that is still as it is in that joomla installation. so smth must still be wrong. But, howevere, once i replaced "bounce.Out" with "Bounce.easeOut" it got bouncy....
Bookmarks