/ Published in: jQuery
Use Collapsorz
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$('.ukn-tags-related-inline ol.ukn-style-1 li:gt(4)').hide(); $('.ukn-tags-related-inline ol.ukn-style-1').append('<li><a class="ukn-toggler ukn-j-tipsy" title="Show more tags" href="#"><span>+</span></a></li>'); $('.ukn-tags-related-inline ol.ukn-style-1 li a.ukn-toggler').toggle(function(e) { e.preventDefault(); $(this).attr('title', 'Show less tags').html('<span>-</span>').parent().parent().addClass('ukn-active'); $('.ukn-tags-related-inline ol.ukn-style-1 li:gt(4)').show(); }, function() { $(this).attr('title', 'Show more tags').html('<span>+</span>').parent().parent().removeClass('ukn-active'); $('.ukn-tags-related-inline ol.ukn-style-1 li:gt(4):not(:last)').hide(); });