From 20f4a18222679db83cdf07582a5c72e73293cf97 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 30 Dec 2010 18:27:09 +0530 Subject: [PATCH] resize earlier --- padmaTexts/static/js/views/sidebar.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/padmaTexts/static/js/views/sidebar.js b/padmaTexts/static/js/views/sidebar.js index 091d8ff..a4f2ccd 100644 --- a/padmaTexts/static/js/views/sidebar.js +++ b/padmaTexts/static/js/views/sidebar.js @@ -3,12 +3,13 @@ var padmaContainer; $(function() { padmaContainer = $('#padmaSidebar'); padmaContainer.data("currentVideo", false); - $(window).resize(function() { + function resize() { var docWidth = $(document).width(); var essayWidth = docWidth - 400; $('#leftWrapper').css("width", essayWidth); - }); - $(window).trigger("resize"); + } + resize(); + $(window).resize(resize); }); function setupPadmaLink(videoObj, data) {