• Jetzt anmelden. Es dauert nur 2 Minuten und ist kostenlos!

Slider autostart?

MN-Beats

Neues Mitglied
Hallo...

Ich habe hiere ein JavaScript Code, es soll ein Slider hervorholen:

HTML:
<script type='text/javascript'>var $jx = jQuery.noConflict(); $jx(function() { $jx(&quot;.mygallery&quot;).jCarouselLite({ btnNext: &quot;.next&quot;,        btnPrev: &quot;.prev&quot;,		easing: &quot;backout&quot;,	    speed: 1000    }); $jx(&quot;.mytext&quot;).jCarouselLite({         btnNext: &quot;.next&quot;,        btnPrev: &quot;.prev&quot;,		visible: 1,		vertical: true,		easing: &quot;backout&quot;,	    speed: 1000	    });	});
</script>
<div id='slidearea'>
<div id='gallerycover'><div class='mygallery'>
<ul>
<li><img src='http://1.bp.blogspot.com/-c1d64TzCbIM/US6v9uWQW8I/AAAAAAAAAWM/lrL9btPPxnk/s000/1.jpg'/> </li>
<li><img src='http://1.bp.blogspot.com/-rAa1ker9I2U/US6v-CpG6OI/AAAAAAAAAWU/4dDjl0o5cyc/s000/2.jpg'/></li>
<li><img src='http://1.bp.blogspot.com/-dpc6DUI0Ae8/US6v-8zUV3I/AAAAAAAAAWc/Jk9UeA3Um-4/s000/3.jpg'/></li>
<li><img src='http://4.bp.blogspot.com/-2PznHdUenAs/US6v_uv8c7I/AAAAAAAAAWk/pAKDLW_037M/s000/4.jpg'/></li>
<li><img src='http://4.bp.blogspot.com/-7rPT5MsP4Ko/US6wAZwqIRI/AAAAAAAAAWs/jkiIr6DS3VM/s000/5.jpg'/></li>
<li><img src='http://2.bp.blogspot.com/-erHikWodrow/US6wBEeppiI/AAAAAAAAAW0/U6d0R9ynYLI/s000/6.jpg'/></li>
</ul><div class='clear'/>	</div></div><a class='prev' href='#'><img alt='Previous' src='http://4.bp.blogspot.com/-vYU_6HrDR5o/US6wBn3xcKI/AAAAAAAAAW8/VNqUTKq9ubI/s000/prevtbn.gif'/></a><a class='next' href='#'><img alt='Next' src='http://1.bp.blogspot.com/-Mc7KLyl52Rc/US6wCFp8p3I/AAAAAAAAAXE/nEFm2ex7tzQ/s000/nextbtn.gif'/></a>   <div id='textcover'><div class='mytext'>
<ul>
<li><h2><a href='ENTER-SLIDE-1-LINK-HERE'>Slide 1 Title</a></h2><p>This is slide 1 description. Go to Edit HTML and find this content. Replace it your own description.</p></li>
<li><h2><a href='ENTER-SLIDE-2-LINK-HERE'>Slide 2 Title</a></h2><p>This is slide 2 description. Go to Edit HTML and find this content. Replace it your own description.</p></li>
<li><h2><a href='ENTER-SLIDE-3-LINK-HERE'>Slide 3 Title</a></h2><p>This is slide 3 description. Go to Edit HTML and find this content. Replace it your own description.</p></li>
<li><h2><a href='ENTER-SLIDE-4-LINK-HERE'>Slide 4 Title</a></h2><p>This is slide 4 description. Go to Edit HTML and find this content. Replace it your own description.</p></li>
<li><h2><a href='ENTER-SLIDE-5-LINK-HERE'>Slide 5 Title</a></h2><p>This is slide 5 description. Go to Edit HTML and find this content. Replace it your own description.</p></li>
<li><h2><a href='ENTER-SLIDE-6-LINK-HERE'>Slide 6 Title</a></h2><p>This is slide 6 description. Go to Edit HTML and find this content. Replace it your own description.</p></li>
</ul>
<div class='clear'/>  </div></div>
</div>

Hier die Bsp. Seite: AppCommander
Meine Frage: Wie mache ich es, das der Slider Autostartet?
 
Du solltest erstmal den HTML-Code aufräumen, da sind noch einige Fehler drinne:
[Invalid] Markup Validation of http://test-dev2.blogspot.de/ - W3C Markup Validator

Wenn Du das hast, dann kannst Du dir in den Demos zu der von dir verwendeten Galerie ein Beispiel raussuchen wie dieses hier:
jCarousel Examples

wo der Slider auch automatisch startet. Relevant ist dieser Code-Abschnitt:

Code:
jQuery(document).ready(function() {
    jQuery('#mycarousel').jcarousel({
        auto: 2,
        wrap: 'last',
        initCallback: mycarousel_initCallback
    });
});
 
Zurück
Oben