Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

图片描述

jquery代码:

$('a.content_expand').unbind('click').bind('click', function(){
     var link = $(this);
     var data = link.attr('data');
     $('#cell_' + data + ' div.post_excerpt').height('100%');
     link.hide();
      link.next().show();
});
$('a.content_fold').unbind('click').bind('click', function(){
   var link = $(this);
   var data = link.attr('data');
   $('#cell_' + data + ' div.post_excerpt').height('241px');
   link.hide();
   link.prev().show();
   $('html,body').animate({scrollTop: $('#cell_' + data + div.post_excerpt').offset().top-80},'10');
});

求教上图红框中的data属性中的值是如何生成的,谢谢~~!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

这不是前端自动生成的吧,看着像是后台模版填充的,至于后台的生成方式,就不好说了


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...