Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [JavaScript][CSS]Wyciągnięcie skryptu z takiej jednej strony, Podana w temacie...
Sotery
post
Post #1





Grupa: Zarejestrowani
Postów: 38
Pomógł: 0
Dołączył: 27.01.2008

Ostrzeżenie: (0%)
-----


Cześć, potrzebuję skrypt z tej strony:
http://aeriagames.com
Chodzi mi o ten skrypt z części "Featured Games" - są tam 2 kolumny, a w każdej 3 obrazki. Mają one taki świetny efekt przejścia po najechaniu.

Dałby ktoś radę wyciągnąć mi ten skrypt, bo już się męczę kilka godzin i nic. A może zna ktoś podobny ?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
lord_t
post
Post #2





Grupa: Zarejestrowani
Postów: 603
Pomógł: 131
Dołączył: 24.07.2007
Skąd: Górny Śląsk

Ostrzeżenie: (0%)
-----


To co widzisz poniżej wymaga przynajmniej mootools.

Kod
// GAME BUTTONS
    $$('.aniGameButton').each(function(element){
        var FxDuration = 700;
        var FxTransition = Fx.Transitions.Elastic.easeOut;
        var smallSize = 55;
        var largeSize = 110;
        
        var buttonFx = new Fx.Tween(element, {
            property:'height',
            duration:FxDuration,
            transition:FxTransition,
            link:'cancel'
        });
        
        element.store('buttonFx', buttonFx);
        element.store('image', element.getElement('img'));
        
        if(element.hasClass('expand')) element.store('expand', true);
        else element.store('expand', false);
        
        element.addEvent('mouseenter', function(e){
            element.getParent().getElements('.aniGameButton').each(function(el){
                el.retrieve('buttonFx').start(smallSize);
                el.retrieve('image').setStyle('opacity',0);
            });
            
            this.retrieve('buttonFx').start(largeSize);
            this.retrieve('image').setStyle('opacity',1);
            this.store('expand', true);

        });      
    });
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 9.10.2025 - 13:00