Jquery slider werkt niet.!

  • Onderwerp starter Onderwerp starter Baze
  • Startdatum Startdatum
Status
Niet open voor verdere reacties.

Baze

Gebruiker
Lid geworden
19 sep 2008
Berichten
45
Wat moet ik doen? Ik kom er echt niet meer uit... Eerst mijn css en dan de Jquery. Ik hoop dat iemand mij hiermee kan helpen. Het is een grote post maar ik ben echt blij als iemand mij kan helpen. Dit is de link waar de slider moet komen (product foto's).
http://www.gotchabv.com/tablets/meerinfo1.html.. Css en Jquery kan je natuurlijk ook in de broncode vinden...




$(document).ready(function(){
/* This code is executed after the DOM has been completely loaded */

var totWidth=0;
var positions = new Array();

$('#slides .slide').each(function(i){

/* Traverse through all the slides and store their accumulative widths in totWidth */

positions= totWidth;
totWidth += $(this).width();

/* The positions array contains each slide's commulutative offset from the left part of the container */

if(!$(this).width() .height())
{
alert("Please, fill in width & height for all your images!");
return false;
}

});

$('#slides').width(3600);

/* Change the cotnainer div's width to the exact width of all the slides combined */

$('#menu ul li a').click(function(e,keepScroll){

/* On a thumbnail click */

$('li.menuItem').removeClass('act').addClass('inact');
$(this).parent().addClass('act');

var pos = $(this).parent().prevAll('.menuItem').length;

$('#slides').stop().animate({marginLeft:-positions[pos]+'px'},450);
/* Start the sliding animation */

e.preventDefault();
/* Prevent the default action of the link */


// Stopping the auto-advance if an icon has been clicked:
if(!keepScroll) clearInterval(itvl);
});

$('#menu ul li.menuItem:first').addClass('act').siblings().addClass('inact');
/* On page load, mark the first thumbnail as active */



/*****
*
* Enabling auto-advance.
*
****/

var current=1;
function autoAdvance()
{
if(current==-1) return false;

$('#menu ul li a').eq(current%$('#menu ul li a').length).trigger('click',[true]); // [true] will be passed as the keepScroll parameter of the click function on line 28
current++;
}

// The number of seconds that the slider will auto-advance in:

var changeEvery = 10;

var itvl = setInterval(function(){autoAdvance()},changeEvery*200);

/* End of customizations */
});
 
Laatst bewerkt:
Ik zie wel dat me table niet gegroepeerd is... Dus moet beetje scrollen :P


<div id="content_container">

<div id="content">

<div id="tab_container">



<ul class="tabs">
<li><a href="#tab1">Specificaties</a></li>
<li><a href="#tab2">Kenmerken</a></li>
<li><a href="#tab3">Product fotos</a></li>
<li><a href="#tab4">Accessoires</a></li>
</ul>

<div class="tab_container">
<div id="tab1" class="tab_content">


<table width="190" border="1">
<tr>
<th scope="row">Products Status:</th>
</tr>
<tr>
<th scope="row">Processor Brand:</th>
</tr>
<tr>
<th scope="row">Memory Capacity:</th>
</tr>
<tr>
<th scope="row">Processor Main Frequency:</th>
</tr>
<tr>
<th scope="row">Model Number:</th>
</tr>
<tr>
<th scope="row">OS:</th>
</tr>
<tr>
<th scope="row">WIFI:</th>
</tr>
<tr>
<th scope="row">Audio:</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">Screen Size:</th>
</tr>
<tr>
<th scope="row">Hard Drive Capacity:</th>
</tr>
<tr>
<th scope="row">Optical Drive Type:</th>
</tr>
<tr>
<th scope="row">Brand Name:</th>
</tr>
<tr>
<th scope="row">Product name:</th>
</tr>
<tr>
<th scope="row">RAM:</th>
</tr>
<tr>
<th scope="row">G-sersor: </th>
</tr>
<tr>
<th scope="row">Video:</th>
</tr>
</table>


<table width="190" border="1">
<tr>
<th class="normal" scope="row">Stock</th>
</tr>
<tr>
<th class="normal" scope="row">Samsung</th>
</tr>
<tr>
<th class="normal" scope="row">512MB</th>
</tr>
<tr>
<th class="normal" scope="row">1GHZ</th>
</tr>
<tr>
<th class="normal" scope="row">Y-S07</th>
</tr>
<tr>
<th class="normal" scope="row">Android 2.3 </th>
</tr>
<tr>
<th class="normal" scope="row">Wireless LAN 802.11 b/g/n </th>
</tr>
<tr>
<th class="normal" scope="row">WMA,MP3,WAV,OOG,AAC,EAAC</th>
</tr>
<tr>
<th class="normal" scope="row">&nbsp;</th>
</tr>
<tr>
<th class="normal" scope="row">7.2"</th>
</tr>
<tr>
<th class="normal" scope="row">Nand flash 4GB (Max to 16G...</th>
</tr>
<tr>
<th class="normal" scope="row">none</th>
</tr>
<tr>
<th class="normal" scope="row">NONE</th>
</tr>
<tr>
<th class="normal" scope="row">Android 2.3 OS 7" Capacity Multi-... </th>
</tr>
<tr>
<th class="normal" scope="row">512MB DDRII</th>
</tr>
<tr>
<th class="normal" scope="row">4 direction( 360°)</th>
</tr>
<tr>
<th class="normal" scope="row">RMVB,WMV9,MPEG4-SP, ASF, Mov, Mkv, TS,... </th>
</tr>
</table>

<table width="190" border="1">

<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
</table>

<table width="190" border="1">

<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
</table>

</div>
<div id="tab2" class="tab_content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque cursus adipiscing ipsum eu pharetra.
Nulla facilisi. Aliquam sagittis enim in leo ullamcorper venenatis. Quisque tincidunt, metus sed eleifend cursus,
nibh dolor adipiscing lectus, a dictum tortor leo ac felis. Integer congue placerat eros, et condimentum ipsum feugiat fermentum.
In sagittis, nulla vel tincidunt facilisis, purus dolor malesuada est, non hendrerit nisl dolor in dui.
</div>
<div id="tab3" class="tab_content">


<div id="main">


<div id="gallery">

<div id="slides">

<div class="slide"><img src="images/slider/sample_slides/imac.jpg" width="920" height="400" alt="side" /></div>
<div class="slide"><img src="images/slider/sample_slides/iphone.jpg" width="920" height="400" alt="side" /></div>
<div class="slide"><img src="images/slider/sample_slides/imac.jpg" width="920" height="400" alt="side" /></div>
<div class="slide"><a href="#" target="_blank">
<img src="images/slider/sample_slides/info.jpg" width="920" height="400" alt="side" /></a></div>

</div>

<div id="menu">

<ul>
<li class="fbar">&nbsp;</li><li class="menuItem"><a href=""><img src="images/slider/sample_slides/thumb_macbook.png" alt="thumbnail" /></a>
</li><li class="menuItem"><a href=""><img src="images/slider/sample_slides/thumb_iphone.png" alt="thumbnail" /></a></li>
<li class="menuItem"><a href=""><img src="images/slider/sample_slides/thumb_imac.png" alt="thumbnail" /></a></li><li class="menuItem">
<a href=""><img src="images/slider/sample_slides/thumb_about.png" alt="thumbnail" /></a></li>
</ul>


</div>

</div>

</div>



</div>
<div id="tab4" class="tab_content">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque cursus adipiscing ipsum eu pharetra. Nulla facilisi.
Aliquam sagittis enim in leo ullamcorper venenatis. Quisque tincidunt, metus sed eleifend cursus, nibh dolor adipiscing lectus,
a dictum tortor leo ac felis. Integer congue placerat eros, et condimentum ipsum feugiat fermentum. In sagittis, nulla vel tincidunt facilisis,
purus dolor malesuada est, non hendrerit nisl dolor in dui.
</div>
</div>

</div> <!-- TAB CONTAINER -->

</div> <!-- END CONTENT-->

</div><!-- END CONTENT CONTAINER -->
 
Maargoed ik ben zelf Webdesigner plus html en css kennis.. Het gaat mij om de Jquery, heb je daar antwoord op?
 
Nee, ik had het nog niet (vaak) gezien, dus vond het wat apart. Maar sorry, nee.
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan