Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [JavaScript][HTML][PHP]Przeróbka Tilted Content Slideshow
jako117
post 23.05.2017, 16:17:26
Post #1





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 21.05.2017

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


Witam, czy ktoś mógłby mi pomóc w przeróbce gotowego slaidera Tilted Content Slideshow (https://tympanus.net/Tutorials/TiltedContentSlideshow/) tak by zamiast tych kresek na dole (do zmiany slaidera) były nazwy tego na co chce zmienić np. Oferta 1 Oferta 2 Oferta 3 Oferta 4

W kodzie skryptu znalazłem i zmieniłem taki fragment:

Kod
TiltSlider.prototype._addNavigation = function() {
        // add nav "dots"
        this.nav = document.createElement( 'nav' )
        var inner = '';
        for( var i = 0; i < this.itemsCount; ++i ) {
            inner += i === 0 ? '<span class="current">jeden</span>' : '<span>dwa</span>';
        }
        this.nav.innerHTML = inner;
        this.el.appendChild( this.nav );
        this.navDots = [].slice.call( this.nav.children );
    }


i otrzymałem coś takiego:
https://drive.google.com/open?id=0B1bvSFQ9y...aTlycUNBdDVRdEU

Jak zrobić żeby dodać jeszcze przyciski: trzy i cztery. Proszę o pomoc smile.gif
Go to the top of the page
+Quote Post
Lord
post 23.05.2017, 17:00:02
Post #2





Grupa: Zarejestrowani
Postów: 239
Pomógł: 32
Dołączył: 10.03.2004

Ostrzeżenie: (10%)
X----




Kod
TiltSlider.prototype._addNavigation = function() {
        // add nav "dots"
        this.nav = document.createElement( 'nav' )
        var inner = '';
               var labels = ['oferta1', 'oferta2', 'oferta3'];
        for( var i = 0; i < this.itemsCount; ++i ) {
            inner += i === 0 ? '<span class="current">' + lebels[i] + '</span>' : '<span>' + lebels[i] + '</span>';
        }
        this.nav.innerHTML = inner;
        this.el.appendChild( this.nav );
        this.navDots = [].slice.call( this.nav.children );
    }


ale nie wiem czy to dobrze tongue.gif

Go to the top of the page
+Quote Post
jako117
post 24.05.2017, 15:38:05
Post #3





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 21.05.2017

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


Niestety nie działa, ale dzięki za zainteresowanie
Go to the top of the page
+Quote Post
Lord
post 24.05.2017, 23:41:37
Post #4





Grupa: Zarejestrowani
Postów: 239
Pomógł: 32
Dołączył: 10.03.2004

Ostrzeżenie: (10%)
X----


Cytat(jako117 @ 24.05.2017, 16:38:05 ) *
Niestety nie działa, ale dzięki za zainteresowanie

literówkę miałem, lebels bylo a nia labels tongue.gif jak nie działa to daj błąd jaki jest tongue.gif
Kod
TiltSlider.prototype._addNavigation = function() {
        // add nav "dots"
        this.nav = document.createElement( 'nav' )
        var inner = '';
               var labels = ['oferta1', 'oferta2', 'oferta3'];
        for( var i = 0; i < this.itemsCount; ++i ) {
            inner += i === 0 ? '<span class="current">' + labels[i] + '</span>' : '<span>' + labels[i] + '</span>';
        }
        this.nav.innerHTML = inner;
        this.el.appendChild( this.nav );
        this.navDots = [].slice.call( this.nav.children );
    }
Go to the top of the page
+Quote Post
jako117
post 25.05.2017, 16:04:08
Post #5





Grupa: Zarejestrowani
Postów: 3
Pomógł: 0
Dołączył: 21.05.2017

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


Super działa, serdecznie dziękuje kolego thumbsupsmileyanim.gif
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 19.04.2024 - 22:31