title: $(window).resize event not working 100% smoothly
body: <p>I run the following code on a page (#home) that should smoothly inject a slider or if the page  container is under 480px leave the page as is.</p>
  
  <p>I cannot get the resize event to work 100% smoothly.</p>
  
  <p>If I reduce the window the script (js.slide.js) wont get triggered but the content will be loaded in (slide.php). If I continue to reduce the window a little extra it will all work ok.</p>
  
  <p>Could anyone please advise as to how I could get this working smoothly. The code is as follows</p>
  
  <pre><code>$(document).ready(function(){
  
  if ($("#home").length &gt; 0 ){ 
  
  var homeSlideShow = {
      $promoArea: $('#promo-area'),
      $currentContent: $('#promo-area').contents(),
      $pageContainer: $('.page'),
  
      init: function(){
          var hSS = homeSlideShow;            
          if (hSS.$pageContainer.width() &gt; 480 ){
              hSS.setTheSlideShow();
          } else{
              hSS.$promoArea.html(hSS.$currentContent);
          }
  
      },
  
      setTheSlideShow: function(){
          var hSS = homeSlideShow;                        
          $.getScript(myscript_wp_vars.temp_dir + '/js/slide.js', function(){
          hSS.$promoArea.load(myscript_wp_vars.temp_dir + '/libs/slide.php #c4u-slide',
          function(){
          var options = {
                      preloader: false,
                      nextButton: true,
                      prevButton: true,
                      animateStartingFrameIn: true,
                      transitionThreshold: 250                        
                  };
  
                  var sequence = $("#sequence").sequence(options).data("sequence"),
                      $slideShow = $("#c4u-slide");
                  });
  
          });
      }   
  
  };
  
  
  
  
  //
  //  Check page size
  //
  if (homeSlideShow.$pageContainer.width() &gt; 480 ){
      homeSlideShow.setTheSlideShow();
  }
  
  
  
  //
  //  On window resize
  //
  $(window).resize(function() {   
      homeSlideShow.init();   
  });
  
  }// END home.length
  
  });//End $(document).ready(function()
  </code></pre>
  
  <p>Thanks in advance for any assistance or advice.</p>
  
  <p>Cheers</p>
  
  <p>Noel</p>