Hi Prototype User Group!
I'm having a bit of trouble.
I'm trying to call methods: create and destroy but they don't work.
"this.destroy is not a function"
I think I'm missing a step here.

var Ball = {
        b_appear: false,

        appear: function()
        {
                if (this.b_appear)
                {
                        this.create();
                        this.b_appear = false;
                }
                else
                {
                        this.destroy();
                        this.b_reorder = true;
                }
        },

        create: function() { alert('create') },
        destroy: function() { alert('destroy') }
}

document.observe('dom:loaded', function()
{
        $('ball').observe( 'click', Ball.appear);
});

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to