Ik heb een jquery slider die werkt op deze code
maar nu wil ik 2x
deze div gebruiken maar dan werkt de 2de niet als ik hem wil gebruiken kunnen jullie me helpenPHP Code:
<div id="slideshow">
<img src=".4.png" width="671" height="482" alt="Slideshow Image 1" class="active" />
<img src="5.png" width="671" height="482" alt="Slideshow Image 2" />
</div>
met dank
PHP Code:
<script type="text/javascript">
function slideSwitch() {
var $active = $('#slideshow IMG.active');
if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
// use this to pull the images in the order they appear in the markup
var $next = $active.next().length ? $active.next()
: $('#slideshow IMG:first');
// uncomment the 3 lines below to pull the images in random order
// var $sibs = $active.siblings();
// var rndNum = Math.floor(Math.random() * $sibs.length );
// var $next = $( $sibs[ rndNum ] );
$active.addClass('last-active');
$next.css({opacity: 0.0})
.addClass('active')
.animate({opacity: 1.0}, 1000, function() {
$active.removeClass('active last-active');
});
}
$(function() {
setInterval( "slideSwitch()", 5000 );
});
</script>
- jquery slider
-
23-04-2012, 23:54 #1
- Berichten
- 320
- Lid sinds
- 15 Jaar
jquery slider
-
-
24-04-2012, 15:53 #2
- Berichten
- 36
- Lid sinds
- 13 Jaar
Re: jquery slider
Exact hetzelfde zoals nu dus het script 2 keer alleen nu noem je slideshow, "slideshow2"
En bij
function slideSwitch() {
var $active2 = $('#slideshow2 IMG.active');
Even overal bij de variabel een 2tje
M.v.g. Wouter
Plaats een
- + Advertentie
- + Onderwerp
Marktplaats
Webmasterforum
- Websites algemeen
- Sitechecks
- Marketing
- Domeinen algemeen
- Waardebepaling
- CMS
- Wordpress
- Joomla
- Magento
- Google algemeen
- SEO
- Analytics
- Adsense
- Adwords
- HTML / XHTML
- CSS
- Programmeren
- PHP
- Javascript
- JQuery
- MySQL
- Ondernemen algemeen
- Belastingen
- Juridisch
- Grafisch ontwerp
- Hosting Algemeen
- Hardware Info
- Offtopic