Advertisement
mspotilas

expand/collapse all blogger comments, for threaded cmts v2

Jan 19th, 2012
802
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.       <b:if cond='data:post.numComments &gt; 1'>
  2.         <script type='text/javascript'>  
  3.         //<![CDATA[
  4.         $(document).ready(function() {
  5.           $('#clpexplinks + H4').css('width','50%');
  6.           $('a.smoothvscroll').bind('click',function(event) {
  7.             $('html, body').stop().animate({ scrollTop: $($(this).attr('href')).offset().top }, 'slow');
  8.             event.preventDefault();window.setTimeout(function(){window.location.hash="comments";},600);});
  9.         });
  10.         //]]>
  11.         </script>
  12.         <div id='clpexplinks' style='text-align:right;float:right;'>
  13.           <a class='smoothvscroll' href='#comments' onclick='$(&quot;#comments dt + dd&quot;).slideUp(&quot;slow&quot;);' title='Hide all comment&apos;s texts'>[Hide comments]</a> -
  14.           <a class='smoothvscroll' href='#comments' onclick='$(&quot;#comments dt + dd&quot;).slideDown(&quot;slow&quot;);' title='Show all comment&apos;s texts'>[Show comments]</a><br/>
  15.           <small>Click on a single comment to hide/show its text</small>
  16.         </div>
  17.       </b:if>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement