$(document).ready(function(){ hauteur_elastique(); $("#contenu").scroll(function() { hauteur_elastique(); }); $(window).resize(function(){ hauteur_elastique(); }); });