Javascript-форум (https://javascript.ru/forum/)
-   Библиотеки/Тулкиты/Фреймворки (https://javascript.ru/forum/library-toolkit-framework/)
-   -   Prototype в jQuery (https://javascript.ru/forum/library-toolkit-framework/13614-prototype-v-jquery.html)

spacemonkey 06.12.2010 12:45

Prototype в jQuery
 
Event.observe(document, 'dom:loaded', function() { 
    new AdminPane(); 
}); 

var AdminPane = Class.create({ 
   initialize: function(){ 
        if ($$('.admin-pane-wrap')[0]){ 
            this.adminPaneWrap = $$('.admin-pane-wrap')[0]; 
            this.adminPaneSwitcher = $$('.admin-pane-switcher')[0]; 
     
            this.adminPaneWrap.setOpacity('0.9'); 
            this.adminPaneWrap.setStyle({height :document.body.clientHeight + 'px'}); 
            this.adminPaneWrap.observe('click', this.toggle.bind(this)); 
            this.adminPaneSwitcher.observe('click', this.toggle.bind(this)); 
            this.off = true; 
        } 
    }, 
    toggle: function(e){ 
        if (this.off)        { 
            this.adminPaneWrap.blindDown(); 
            this.off = false; 
        } 
        else 
        { 
            this.adminPaneWrap.dropOut(); 
            this.off = true; 
        } 
    } 
});


Кто поможет переписать вышеуказанный код в jQuery? Буду весьма признателен.


Часовой пояс GMT +3, время: 11:36.