I'm trying to set up a toggle function to show more content IN A TABLE.
So here it is, I can't do much things with my < tr >, I don't know if its because I missed something or because toggle() only works with < div > ?
Here is what I did :
The script
<script>
$(document).ready(function() {
// hides the slickbox as soon as the DOM is ready (a little sooner that page load)
$('.hidden').hide();
// slides down, up, and toggle the slickbox on click
$('.more-info').click(function() {
$('.hidden').slideToggle(1000);
return false;
});
});
</script>
The button :
<div style="float:right;"><a href="javascript:void(0)" class="more-info">Show more</a>
</div>
The table (the tr to Toggle):
<tr class="hidden">
<td>
<img id="tableImage" src="<?php echo base_url($product['image_url'])?>" alt="product" width="121"/>
</td>
<td>
<?php echo $product['title'] ?>
</td>
<td>
<?php
$options = array(
'0' => '0',
'1' => '1',
'2' => '2',
'3' => '3',
'4' => '4',
'5' => '5',
'6' => '6',
'7' => '7',
);
if($product['quantity']==0){
$value[$product['title']] = set_value('quantity'.$product['title']);
}else{
$value[$product['title']] = $product['quantity'];
}
$data0 = 'class="quantSelect" value="'.$value[$product['title']].'" id="quant'.$product['title'].'"';
echo form_dropdown('quantity'.$product['title'], $options, $value[$product['title']],$data0);
?>
</td>
<td>
<?php echo $product['price'] ?>
</td>
<td id="<?php echo 'price'.$product['title']?>">$<?php echo $total[$product['title']] ?>
</td>
</tr>