/ Published in: jQuery
Calcul de largeur (width) du conteneur en jquery suivant les dimension des élément contenu, ici pour jscrollpane
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function exceptionScrollPane(){ var width = 0; var conteneurPanneau = jQuery('#wrapScrollPane'); jQuery('#conteneurScrollPane section').each(function() { width += jQuery(this).outerWidth( true ); }); jQuery('#conteneurScrollPane').css('width', width); conteneurPanneau.jScrollPane({ showArrows: true, arrowButtonSpeed: 264, animateScroll: true }); }