All you really need to do is store a variable of the id that is currently
open so that you can close only that. For example, for Slashdot:
{
new Effect.SlideUp(currentlyOpen);
new Effect.SlideDown(''slashdot'');
currentlyOpen = ''slashdot'';
}
Something along those lines. Though I don''t really see it as a
workaround,
more like common programming practices....
On 12/3/05, Snehal P <snehalp-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:>
> Hi ,
>
> i jotted down this script here
> http://awstagingserver.net/snehal/ajax/prototype/rssget/news.asp#
> its a RSS reader thing , what i am trying to achieve here is save
> browser space here by using SlideDown and SlideUp , as you might see
> whats happening with the script when you click on the newsbar name ,
> what i want is when initially WorldNews is displayed and when you
> click on Slashdot ,it should slide up the open news bar (this case
> WorldNews) and slide down Slashdot. but since we cant guess which news
> bar is open i have written this code in the onClick for Slashdot,
> new Effect.SlideDown(''dash3'');
> new Effect.SlideUp(''dash1'');
> new Effect.SlideUp(''dash2'');
>
> but because dash2 was not open and while trying to slide up the hidden
> table in the div , it first opens the div and then slides it up,which
> makes it look like a lots happening , so if i un comment slideup for
> dash 2 , then it works as i want , any work arounds you might suggest
> ?
>
> Please advice.
>
> Thanks
>
> Regds
> Snehal
> _______________________________________________
> Rails-spinoffs mailing list
> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
>
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs