[Proto-Scripty] $$() and Element.observe() question

2008-10-28 Thread kimbaudi
Hi, I am having trouble with using Element.observe() with $$(). If I have an element with id=id, I can do this: $('id').observe('click', function() {alert('clicked');}); However, if I have elements with class=class, I can't do this: $$('.class').observe('click', function()

[Proto-Scripty] Effect.toggle slide doesn't work well with unordered/ordered list elements

2008-10-30 Thread kimbaudi
Hi, I was inspired by http://www.exit404.com/2005/57/unobtrusive-persistant-scriptaculous-effects to create a menu that would expand and contract the menu whenever I click on the menu header. Instead of using Effect.BlindDown and Effect.BlindUp, I decided to use Effect.toggle to toggle the

[Proto-Scripty] Effect.toggle('slide'), Effect.SlideUp, Effect.SlideDown is problematic in Opera

2008-10-31 Thread kimbaudi
Hi, if you check the demo for Effect.toggle('slide'), Effect.SlideUp, Effect.SlideDown using the Opera browser, you will notice that you get Effect.toggle('blind'), Effect.BlindUp, Effect.BlindDown effect instead. http://github.com/madrobby/scriptaculous/wikis/effect-toggle

[Proto-Scripty] Help! How to get document.body height using Element.getDimensions

2009-05-05 Thread kimbaudi
Hi, I am unable to get the height of the body tag using Element.getDimensions although I can get the width of the body tag fine. How can I get the height of the body tag? I have my simple code pasted at http://pastie.org/468828. Here is the snippet of code below as well: function alertBodyDim()

[Proto-Scripty] Why does document.viewport.getDimensions() not work without a DOCTYPE?

2009-06-08 Thread kimbaudi
Hi, I have taken a look at the Prototype API and it says that document.viewport.getDimensions() should return the size of the viewport. I have created a simple page with a div with width of 100px and height of 100px. I am hoping to alert the height of the browser window, but I get the height of

[Proto-Scripty] How can I observe elements with class=test_1, test_2, test_3 or first_test, second_test, third_test?

2009-12-31 Thread kimbaudi
Hi, I know how to observe elements with class=test. However, I would like to know how I would be able to observe elements with class=test_1, class=test_2 and class=test_3 or class=first_test, class=second_test and class=third_test. Here is my pastie url that observes elements with class=test and

[Proto-Scripty] Help with blindup/blinddown effect using mouseover/mouseout events

2010-01-09 Thread kimbaudi
Hi, I have a hidden block element absolutely positioned to the bottom right of my webpage. I am trying to display this block element when I mouseover that area and hide this block element when I mouseout from that area using Effects.BlindUp and Effects.BlindDown. At first glance, my webpage seems

[Proto-Scripty] Scriptaculous Effect.toggle on Prototype-extended elements

2010-01-10 Thread kimbaudi
Hi, I am able to use Effect.fade on Prototype-extended elements. So, instead of doing the following: Effect.Fade('id_of_element'); I can do this instead: $('id_of_element').fade(); However, when I try to use Effect.toggle on Prototype-extended elements, it doesn't work. This works:

[Proto-Scripty] How can I pause and resume PeriodicalExecuter?

2010-02-09 Thread kimbaudi
Hi, does anybody know how I can pause and resume Prototype's PeriodicalExecuter? Basically, I have a simple example script that periodically executes every 1 second, but I want there to be a 5 second delay for each 5th time the script is executing. Here is the link to the example script I posted

[Proto-Scripty] Do I stop observing events on element with Ajax.Autocompleter using Event.stopObserving()

2010-04-29 Thread kimbaudi
Hi, I have a form with multiple text inputs (i.e. input type=text name=list_1 id=list_1 ... input type=text name=list_5 id=list_5) which all have Ajax.Autocompleter initialized. Now when I remove any of these autocompleting text inputs from the DOM, I want to stop observing events on these