<div class=" tabs_wrapper <?php echo $cssname;?>">
  <ul class="imgtext_fix tabs_header"> 
  <?php
      foreach($result['data'] as $k=>$v){
          $k++;
          ?>
           <li  class="<?php echo $k==1?'active':''?>"><a href="#anchor<?php echo $k;?>"><?php echo $v['title'];?></a></li>
   <?php
        
      }
    ?>

  </ul>

<div class="tabs_contentwrap blockdesp scrollfixlinewrap"> 

<?php

foreach($result['data'] as $k=>$v){
          // pre($v);
      $title = $v['title'];  
       $img  =   get_img($v['kv']);  
        $desp  =   $v['desp'];
        $despjj  =   $v['despjj'];
         
       $dhlinkurl =  $dhlinktitle= '';
            foreach ($v['arrcan'] as   $key=>$value) { 
                 $bsccc = $key;
                 $$bsccc=$value;
             }

$linkurlarr =  get_nodelinkurl($dhlinkurl);

 
 
$stylev = $dhcssstyle==''?'':' style = " '.$dhcssstyle.' "';

$k++;

$anchorv =  'anchor'.$k;

 $isfull = $isfull=='y'?'':'container';
 
 echo  '<div   class="scrollfixline tabs_content  '.$dhcssname.'" '.$stylev.'>';
  echo '<span class="dmanchor" id="'.$anchorv.'"></span>';
  echo '<div class="regionhd "><h3 class="hd">'.$v['title'].'</h3><div class="titleline  titlelinelong"> <span class="titlelineshort"></span></div></div>';



echo '<div class="'.$isfull.'">';
textformat($v,$cssname);
echo '</div>';


 echo '</div>';


   
}


?>
</div>
</div>

<script>
$(function(){
  $('.imgtext_fix li').click(function(){
          $('.imgtext_fix li').removeClass('active');
          $(this).addClass('active');
           $('.imgtext_fix').addClass('stricky-fixed');

          

  });


    jQuery(window).scroll(function(){ 
      
       var topdistance = 100;
       
        var visiblock_min = 0;
        var visiblock_max = 0;
      var scrolldistance = jQuery(document).scrollTop()+150;
      
      jQuery('.scrollfixline').each(function(index){
      // var index = index+1;
         
         visiblock_min = jQuery(this).offset().top - topdistance; 
         visiblock_max = visiblock_min + jQuery(this).height() ;
        
         //console.log(index+":top:"+jQuery(this).offset().top);
         //  console.log(index+":scrolldistance:"+scrolldistance);
           //console.log(index+":visiblock_min:"+visiblock_min);
          // console.log(index+":visiblock_max:"+visiblock_max);
         
       // index++; 
        
if(index==0)  {     
        
           }
       
          
         if(scrolldistance>visiblock_min && scrolldistance<visiblock_max){ 

             $('.imgtext_fix li').removeClass('active');
               $('.imgtext_fix li').eq(index).addClass('active');
               $('.imgtext_fix').addClass('stricky-fixed');  
            }
            
            var  scrollfinish =  jQuery('.scrollfixlinewrap #anchor1').offset().top;
            
            if(scrolldistance<scrollfinish) $('.imgtext_fix').removeClass('stricky-fixed');
             
         
         
         });
         
 
  });
//-----------------




})
</script>