I wanted the panel titles to be clickable as well, instead of just the little icon on the far right side of the panel. This is easy with just a little javascript.
1 2 3 4 5 6 7 8 9 10 11 12 |
jQuery('body').on('click', '.portlet > .portlet-title', function (e) { jQuery(this).find('.tools > .collapse, .tools > .expand').each(function() { var el = jQuery(this).closest(".portlet").children(".portlet-body"); if (jQuery(this).hasClass("collapse")) { jQuery(this).removeClass("collapse").addClass("expand"); el.slideUp(200); } else { jQuery(this).removeClass("expand").addClass("collapse"); el.slideDown(200); } }); }); |
This is specific for the Metronic theme. This code was placed in the /assets/scripts/core/app.js ..