jQuery代码的Jquery的fancybox联内容显示不同的div的内容
$("a#inline").fancybox({
'type' : 'inline',
'hideOnContentClick': true
});
HTML代码
<div class="top_wrap">
<div class="top_header">Testimonial</div>
<div class="top_text">
<?php
if($getClientTestimonial->num_rows()>0){
//$result = $profile->row();
foreach ($getClientTestimonial->result()as $row){
$clientName= $row->testimonialClientName;
$clientTestiContent= $row->testimonialContent;
//$length =10;
$displaytype= substr($clientTestiContent,0,50);
?>
<strong><?php echo $clientName;?></strong>
<a id="inline" href="#data"><?php print_r($displaytype) ;?></a><br>
<div style="display:none"><div class="data" id="data"><?php echo $clientTestiContent;?></div></div>
<?php }}?>
</div>
</div>
的问题是,它显示不同#DATA的内容......类似的东西展示内容1,2,3,4 ....如果我点击4它显示1格的内容?接下来,如果我点击1它显示2格的内容?
的content is
1 div content
2 div content
3 div content
4 div content
的onclick 4格内容显示1个格内容的内容,但应该显示4格内容的内容
如何克服这个问题
你的意思是你想分页花哨的盒子? – Shaheer 2012-02-24 05:48:00
都能跟得上不...分页内容显示不同的div – Ghostman 2012-02-24 05:48:48
的,那么你将需要绑定与每个锚看中箱事件独立 – Shaheer 2012-02-24 05:53:11