/ Published in: JavaScript
Expand |
Embed | Plain Text
var counter; $("#ukn-clusters ul.ukn-component-main li ul").each(function() { counter = 1; $(this).children("li").each(function() { if (counter > 3) $(this).addClass('ukn-cluster-hidden').hide() counter++; }); });
Comments
Subscribe to comments
You need to login to post a comment.

$('.ukn-expand').click(function(){ $(this).toggleClass('ukn-collapse'); $(this).next().children().next('li.ukn-cluster-extras').toggle(400); return false; });
(Expand results after they've been collapsed)
Code unused due to the finding of collapsorz jquery plugin (http://jquery.kuzemchak.net/collapsorz.php)