javascript help!!
- Started
- Last post
- 25 Responses
- Teeuwen
http://wiki.script.aculo.us/scri…
i want to end/terminate a certain effect when the user clicks; not all effects at once, just a certain predefined effect.
this is so simple so it seems but i could not find anything there..
- foreign0
that's a very broad question.
conditional statement?
- Teeuwen0
right...
no conditions, just terminate the execution of a certain effect with onclick..
- myobie0
if you do the effect like:
something = new Effect.blah
then you can:
something.cancel();
- Teeuwen0
this is a slideshow i will be using.
http://www.bigbold.com/snippets/…however, the slideshow is inside a div that will slide up and down to show and hide it.
i want the slideshow to quit once the user "closes" the div again.
mainly because the positioning of the slides goes bonkers when the parent div is being slided...
- Teeuwen0
right myobie, so something would be the name of the effect?
sorry, i am not a js. expert, just a beginner..
- myobie0
ah
that function does a set timeout to launch a function which does a set timeout to launch a function which...etc, etc, etc...
i would think it would use set interval because that would do the thing over and over, like they are doing themselves...
you can clearTimeout() a timeout object...but you would have to have one...
you may want to lookup how to use the setTimeout function...that is what is doing the slideshow, scriptaculous is just doing the fading...
if you get really lost, let me know
- Teeuwen0
slideshow.Cancel();
does not work..
would it be slideshow.clearTimeout() ?
or does that not make sense?
- Teeuwen0
bump!
- myobie0
ok
if you need a good slideshow, you may want to look for another one
this one does not already have the ability to be canceled
you would have to rewrite the js to save the timeOut object to a variable so you could clearTimeout that object...
the current version of the slideshow is a never ending loop of timeouts that cannot be stopped without modifying the code...
sorry...but i don't have time to write a slideshow today
but if you lookup how the setTimeout function works i am sure you could rewrite the thing to do it...
- Teeuwen0
i am afraid i can't.. :(
but thx anyway! may have to look for another one then..
- myobie0
you working on this for yourself?
deadline?
have you seen slideshowpro?
if you have time, i could help you piece this together a few days from now...
- Teeuwen0
you working on this for yourself?
deadline?
have you seen slideshowpro?
if you have time, i could help you piece this together a few days from now...
myobie
(Aug 31 06, 06:29)yeah, it is for my own new site, and i am afraid i can't use Flash. I have used SlideshowPro before, but it is both too loaded with features i dont need AND i can't/won't use Flash in this..
here it is:
http://vormburo.nl/jstest/
click the first line in the projects list, then close it and open it again. (sluit = close in dutch)
- myobie0
i c
yeah. you are probly gonna need some custom script...
but it shouldn't be too hard
let me know if you run into trouble
- Teeuwen0
would it be hard for you?
to adjust this script?
i can gie you a little award.i really have to get this site up SOON!
(today if possible)i could also credit you on my site if you could help me out!
:)
cheers.
- Teeuwen0
*reward
- ********0
Janne, You mite be able to alter the JS Function "start_SlideShow", to "end_SlideShow" - and intake the same paramters ... just do not set the TimeOut or something.
And in the link to initially open it ... when clicked do the expand accordion thing, but also swap the start_SlideShow to end_SlideShow.
You know, kind of like when you set things up to display:none; display:show, when you click them.
Eh?
- ********0
Also, are you going to set it up so that when you open up a new project or whatnot, that all the other ones close?
- Teeuwen0
thx flavor, i'll see if i can do that..
i have never modified things in js-scripts, but i could give it a shot.
- ********0
I wish I could be more help with this but I'm like 2 hours late for work and am in meetings all day. :X
Then after work ... I probably won't be touching NT that much until Monday.
... If you still have problems then I'll be glad to help!!
Haha, sorry.
- Teeuwen0
Also, are you going to set it up so that when you open up a new project or whatnot, that all the other ones close?
flavorful
(Aug 31 06, 06:58)no that would be sweet, but how to do that?
would i have to toggle all the other ones in every div?
that's a bit much, innit?