HI,
I have this code:
document.observe('dom:loaded', function() {
var button = $('stats_button');
button.observe('click', function(event) {
var divdiv = $('stats');
new Effect.SlideDown('stats');
})
})
now this works fine but doesnt work as i want....it currently displays
the stats div on page load and then when i click it just runs the
effect......what i want is the effect initially hidden then when the
user clicks the element with an id of stats_button it slides down and
then when they click again it clides back up...
I could do this with prototype and the toggle() function but i want a
nice slide effect..
any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---