Guest User

Untitled

a guest
Jan 3rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. /* =====
  2.  
  3. You are free to modify this file but you should really create a folder in your
  4. themes directory called (exactly) multi-column-tag-map and then copy this file
  5. to that folder. Make your edits to the copy. If you make your edits to the
  6. file in the plugins folder, all your edits will be overwritten if you update.
  7.  
  8. ===== */
  9.  
  10. /* ===== version 13.0.5 ===== */
  11.  
  12. /* ===== equalize ===== */
  13.  
  14. (function (jQuery) {
  15. jQuery.fn.mctagmapEqualHeights = function() {
  16. var max_height = 0;
  17. var currentHeight = 0;
  18. this.each(function() {
  19. currentHeight = jQuery(this).height();
  20. if(currentHeight > max_height) {
  21. max_height = currentHeight;
  22. }
  23. });
  24. this.each(function() {
  25. jQuery(this).delay(0).animate({'min-height' : max_height}, 0);
  26. });
  27. };
  28. })(jQuery);
  29.  
  30. jQuery(document).ready(function(){
  31.  
  32. /* ==== toggle ==== */
  33. jQuery('a.less').hide();
  34. jQuery('ul.links li.hideli').hide();
  35. jQuery('ul.links li.morelink').show();
  36. jQuery(' a.more').click(function() {
  37. jQuery(this).parent().siblings('li.hideli').slideToggle('fast');
  38. jQuery(this).parent('li.morelink').children('a.less').show();
  39. jQuery(this).hide();
  40. });
  41. jQuery('a.less').click(function() {
  42. jQuery(this).parent().siblings('li.hideli').slideToggle('fast');
  43. jQuery(this).parent('li.morelink').children('a.more').show();
  44. jQuery(this).hide();
  45. });
  46.  
  47. /* ===== equalize ===== */
  48. var numberOfHoldLeftChildren = 0;
  49. var numberOfTagIndex = jQuery('.mcEqualize .holdleft').eq(0).children('.tagindex').length;
  50. while(numberOfHoldLeftChildren <= numberOfTagIndex){
  51. jQuery('.mcEqualize .holdleft').children('.tagindex:nth-child('+numberOfHoldLeftChildren+')').mctagmapEqualHeights();
  52. numberOfHoldLeftChildren++;
  53. }
  54.  
  55. /* ==== test purposes
  56. jQuery('.tagindex').css({'background-color' : '#D9CBDB', 'margin-bottom' : '10px'});
  57. ==== */
  58.  
  59. });
Add Comment
Please, Sign In to add comment