(I'm new to php/mysql, please excuse)
here's the page where I'm playing with jQuery slider (jContent Slider):
http://www.tradeglobus.com/index2.php
The problem is, lets say this jContent slider has 4 slides, & I want it to get the data from mysql & display it in all four slides.
What is confusing me is that it displays the first four products on 1st slide, then it must continue from 5th product on next slide....& so on.
but its calling the data in same sequence, like:
Slide1:
Product1 - Product2 - Product3 - Product4
Slide2:
Product1 - Product2 - Product3 - Product4
Slide3:
Product1 - Product2 - Product3 - Product4
Slide4:
Product1 - Product2 - Product3 - Product4
and its not starting from 5th product on the next slide.
what & where could be the problem ?
here's the slider code:
<div class="GridHeading">jContent Slider</div>
<div class="GridContent" style="height: 250px; width: 550px;">
<script type="text/javascript" language="javascript" src="bx/jquery-1.8.3.min.js"></script>
<script type="text/javascript" language="javascript" src="bx/jquery.bxslider.js"></script>
<link href="bx/jquery.bxslider.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" language="javascript">
var $bx = jQuery.noConflict(true);
$bx(document).ready(function(){
$bx('.slider2').bxSlider({
auto: true,
slideWidth: 400,
minSlides: 2,
maxSlides: 2,
slideMargin: 10
});
});
</script>
<div class="slider2">
<div class="slide">
<img src="http://placehold.it/350x150&text=FooBar1">
<img src="http://placehold.it/350x150&text=FooBar2"></div>
<div class="slide">
<img src="http://placehold.it/350x150&text=FooBar3">
<img src="http://placehold.it/350x150&text=FooBar4"></div>
<div class="slide">
<img src="http://placehold.it/350x150&text=FooBar5">
<img src="http://placehold.it/350x150&text=FooBar6"></div>
<div class="slide">
<img src="http://placehold.it/350x150&text=FooBar7">
<img src="http://placehold.it/350x150&text=FooBar8"></div>
<div class="slide">
<img src="http://placehold.it/350x150&text=FooBar9">
<img src="http://placehold.it/350x150&text=FooBar10"></div>
</div>
</div>
And here's the code I'm applying to jquery slides to show 4 cells on each slide:
<ul>
<?php
$Query = clsMembers::getSupplierByLimit(16, 0);
$SupplierList = $objDatabase->runStoredProcedure($Query);
if(count($SupplierList))
{
foreach($SupplierList as $Supplier)
{
echo '<li style="height:110px; width:275px; border-removed 1px solid #99CCFF;">
<table cellpadding="0" cellspacing="0" border="0" width="100%" height="125px" style="padding-removed 15px; padding-removed 10px;">
<tr>
<td align="center" valign="top" rowspan="2" width="90px">
<a href="' . BASE_HOST . 'companies_details/' . $Supplier['MemberID'] . '/' . clsPresent::removeSpecialChars($Supplier['company_name']) . '.htm">
<img src="' . clsPresent::checkImageExistance(BASE_HOST . DEFAULT_COMPANY_LOGO_PATH . $Supplier['company_logo']) . '" class="classimg" width="80px" height="80px">
</a>
</td>
<td align="left" valign="top" class="removed" width="200px" style="height: 15px;">
<a href="' . BASE_HOST . 'companies_details/' . $Supplier['MemberID'] . '/' . clsPresent::removeSpecialChars($Supplier['company_name']) . '.htm">' . ((strlen($Supplier['company_name']) > 30) ? (substr($Supplier['company_name'], 0, 27) . "...") : $Supplier['company_name']) . '</a>
</td>
</tr>
<tr>
<td align="left" valign="top" class="content" height="105px">
<span style="line-height: 15px;">
' . ((isset($Supplier['company_desc']) && $Supplier['company_desc'] != "") ? ((strlen($Supplier['company_desc']) > 130) ? (substr($Supplier['company_desc'], 0, 127) . "...") : $Supplier['company_desc']) : "") . '
</span>
</td>
</tr>
</table>
</li>';
}
}
?>
</ul>
Please somebody help me with this, I've spent over 4 days to resolve this issue.
Thanks in advance
Raza Khan