Guest User

Untitled

a guest
Dec 28th, 2012
579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function($) {
  2. $.fn.orphans = function(){
  3.     var txt = [];
  4.     this.each(function(){$.each(this.childNodes, function() {
  5.         if (this.nodeType == 3 && $.trim(this.nodeValue)) txt.push(this)
  6.     })});
  7.     return $(txt);
  8. };
  9. })(jQuery);
  10. ////////////////////////////
  11. $(function() {
  12.     $('#content .expand').orphans().wrap('<a href="#" class="plussub" title="expand/collapse"></a>');
  13.    
  14.     $('div.accordion-sub:eq(0) ul').find('ul.collapse').hide();
  15.     $('div.accordion-sub:eq(0) .expand').click(function() {
  16.         $(this).toggleClass('open').siblings().removeClass('open').end()
  17.         .find('ul').slideToggle(800);
  18.         return true;
  19.     });
  20.  
  21. $(".block").click(function(){
  22.      window.location=$(this).find("a").attr("href");
  23.      return false;
  24. });
  25. });
Advertisement
Add Comment
Please, Sign In to add comment