loadmore函数在网格视图上工作,但在同一页面上没有列表视图

时间:2016-04-06 05:18:16

标签: php jquery codeigniter

在我的视图页面中有两种类型的视图网格视图和列表视图。在网格视图中加载更多功能正常工作但是当我选择列表视图加载时更多功能不在那里工作.. 这是我的观点页面..

  <div class="tab-pane fade  in active" id="shop-grid-tab">
    <div class="row ">

        <div class="shop-product-tab first-sale container2"> 

        <!-- product start -->

        <?php foreach($mengalery as $row){?>
        <?php $images=json_decode($row->image);{?>
        <div class="item">
        <div class="col-lg-3 col-md-3 col-sm-4 col-xs-12">
          <div class="product_list">
            <div class="single_product"> 
            <a href="#"  target=""><img class="slb" src="<?php echo base_url();?>images/<?php echo $images[0];?>" alt="" /></a>

            </div>
          </div>
        </div>
        </div>
        <?php }}?>
        <!-- col-lg-4 col-md-4 col-sm-4 end --> 




      </div>
    </div>
  </div>
  <!-- list view product-->
   <div class="tab-pane fade " id="shop-list-tab">
    <div class="list-view container2"> 

      <!-- single-product start -->
     <?php foreach($mengalery as $row){?>
      <?php $images=json_decode($row->image);{?>

      <div class="row list ">
      <div class="item">
       <div class="col-lg-3 col-md-3 col-sm-4 col-xs-12">
          <div class="product_blog_image">
            <div class="product_blog_image"> <a href="<?php echo base_url();?>hardpolo_control/details"><img src="<?php echo base_url();?>images/<?php echo $images[0];?>" alt="" /></a> </div>
          </div>
        </div>

      </div>

     </div>

      <?php }}?>

    </div>

  </div>
  <!-- single-product end --> 

这是我的控制者......

public function men()
{  
    $data['active_mn']='men';

    $data['mendropdown']=$this->Hardpolo_model->get_category_by_parent($p_id=8);
    $data['kidsdropdown']=$this->Hardpolo_model->get_category_by_parent($p_id=9);
    $data['accessoriesdropdown']=$this->Hardpolo_model->get_category_by_parent($p_id=21);
    $config['base_url'] = base_url().'Hardpolo_control/men';
    $config['per_page'] = 6;
    $config['uri_segment'] = 3;
    $config['total_rows'] = $this->Hardpolo_model->count_images($p_id=8);
    $config['next_tag_open'] = '<span class="next a">';
    $config['next_tag_close'] = '</span>';
    $data['mengalery']=$this->Hardpolo_model->get_all_images($p_id=8,$config['per_page'],$this->uri->segment(3));

    $this->load->library('pagination',$config);
    $data['page_links'] = $this->pagination->create_links();
    $this->load->view('men',$data);
}

这是我的剧本..

<script src="<?php echo base_url();?>assets/js/jquery-ias.min.js"></script>


 <script>
 var ias = $.ias({
 container: ".container2",
 item: ".item",
 pagination: "#pagination",
 next: ".next a"
 });

  ias.extension(new IASSpinnerExtension());            
  ias.extension(new IASTriggerExtension({offset: 2}));
  ias.extension(new IASNoneLeftExtension({
  text: 'There are no more pages left to load.'      
 }));
 $(function () {
 $('[data-toggle="tooltip"]').tooltip()
 })
 </script>

我已经为这两个视图提供了classname作为container2,并且我已经给出了不同的classname值,但是它们都没有工作

0 个答案:

没有答案