AliMD / 1Tuts

:+1: Web Design Technology Tutorials
http://ali.md/tuts
63 stars 41 forks source link

slider eshkal dare #510

Closed soheil1999 closed 11 years ago

soheil1999 commented 11 years ago

salam. man omadam toye site slider gozashtam. slideri ke khodam sakhtam be tarz ajibi hei har slide ke miraft jelo dobare miparid aghab (be tartib: slide 1, slide 2, slide 1, slide 3, slide 1 , slide 4 , slide 1 va ....) bad az mal shoma yeki ro copy kardam hey error getelements by tag name of null va cannot change class name property of null midad. che konam?zemnan mosalaman kelasasho tanzim karde boodam. @AliMD

soheil1999 commented 11 years ago

ey baba @AliMD ghahr kard :cry:

soheil1999 commented 11 years ago

va yek soal dige ke mitarsam beporsam dige ta 2 sal dige be hich soalam javab nadin. bekham sub menu ham hamashon gerd bashan chi kar konam? be li ha ke border-radius midam hichi nemishe

ghost commented 11 years ago

khob be a bayad bdi dg mage bacground-color ro be a nadady {behtare be jofteshoon bdi}

soheil1999 commented 11 years ago

@mghayour mamnoon vali moshkel injast ke ba a ham midam etegaghi nemiofte

AliMD commented 11 years ago

source code ?

soheil1999 commented 11 years ago

window.onload=function(){ var slideshow = document.getElementsByClassName('slideshow').item(0);

var train = slideshow.getElementsByClassName('train').item(0);
var currentSlide = 0;

gotoslide = function (n) {
    if (train.style.left >= -620 + 'px') {
        train.style.left=(-310*n)+'px';
        currentSlide=n;
    }
    else if (train.style.left < -620 + 'px') {
        train.style.left=0;

    };
}

nextSlide = function(){
    gotoslide(currentSlide+1);
}

gotoslide(0);

setInterval(nextSlide,2000);

} albate bazi jahasho az code shomam komak gereftam

AliMD commented 11 years ago

Wow ! ye dor dige ali.md/jsss ro nigah kon

AliMD commented 11 years ago

jane ma in yani chi ?! else if (train.style.left < -620 + 'px')

soheil1999 commented 11 years ago

che moshkeli dare?

soheil1999 commented 11 years ago

mage to js else if nadarim?

soheil1999 commented 11 years ago

@alimd ino ezafe kardam ke bad az payan aks ha edame nade

AliMD commented 11 years ago

yani chi < -620 + 'px' < baraye numbere bali .left ye string e ! az tarafi baz jamesh ba 'px' che sigheyiye ?! yedor mabahese W3 ro moroor kon https://github.com/AliMD/1Tuts/issues?labels=W3&milestone=&page=1&state=closed tozihesh mofasale nemishe inja tozih bedam magar barat az aval benevisam ke faghat code harodashte bashi ke in joori nemifahmi va manam forsatesho nadaram

soheil1999 commented 11 years ago

alan quick fix nadare?

AliMD commented 11 years ago

na, az paybast viranast

AliMD commented 11 years ago

mitooni felan ye var tarif koni va bejaye left azoon estefade koni age sample haye class ro bebini kamelan mifahmi