title: jquery: fireing public method of one plugin after changes from second plugin
body: <p>hey there.. need some advice again :)</p>
  
  <p>I'm working on a project with a filterable portfolio [based on this plugin link: <a href="http://www.gethifi.com/blog/a-jquery-plugin-to-create-an-interactive-filterable-portfolio-like-ours" rel="noreferrer">www.gethifi.com/blog/a-jquery-plugin-to-create-an-interactive-filterable-portfolio-like-ours</a>.</p>
  
  <p>the portfolio items are shown in a horizontal slider which is adding scroll areas (hot spots) on the left and right side of the browser window.</p>
  
  <p>here comes my problem:</p>
  
  <p>the width of the slider is calculated in the plug-in smoothdivscroller <a href="http://www.smoothdivscroll.com" rel="noreferrer">www.smoothdivscroll.com</a>. but when i change the content of the slider via the filter navigation the total width of the slider changes, but the smoothdivscroller plug-in is not noticing it.</p>
  
  <p>i set up a simplified <a href="http://jsfiddle.net/tobiasmay/QudtF/" rel="noreferrer">example</a> in jsfiddle for you and you can experience the whole problem here<a href="http://kuemmel-schnur.de/projekte" rel="noreferrer">kuemmel-schnur.de/projekte</a>: when all projects are shown (Alle) and you scroll to the right and then switch to the category "Lehrprojekte" you won't see any projects because they are on the far left side and the total width of the container is not recalculated.</p>
  
  <p>in order to fix this i have three ideas where i need some serious help.</p>
  
  <p>1) the smoothdivscroll plug in offers a public method to recalculate the width of the container like </p>
  
  <pre><code>$("#makeMeScrollable").smoothDivScroll("recalculateScrollableArea");
  </code></pre>
  
  <p>which i need to fire every time after <code>portfolio-list a</code> is clicked. and i need to combine this with the method where the slider automatically switches to the first element of the current content </p>
  
  <pre><code>$("#makeMeScrollable").smoothDivScroll("moveToElement", "first");
  </code></pre>
  
  <p>2) My second idea - cause i don't know if or how 1) works - is to check if the url changes and then fire the recalculation. the filter uses a hash to address the content. so i thought i could read out the url and every time the part directly after the hash changes i could fire the method.</p>
  
  <p>3) I could bind the filterable plug-in to the smoothDivScroll plug-in with something like (beware of completely wrong code :)</p>
  
  <pre><code>$('#portfolio-list').filterable();
   $('#portfolio-filter a').click(function(){
          $('#makeMeScrollable').smoothDivScroll("moveToElement", "first")("recalculateScrollableArea");
  });
  </code></pre>
  
  <p>so.. what do you think? again the jsfiddle link: <a href="http://jsfiddle.net/tobiasmay/QudtF/" rel="noreferrer">jsfiddle.net/tobiasmay/QudtF/</a></p>
  
  <p>thanks,
  tobi.</p>
  
  <p>ps. i would have setup the links properly, but i need 1 more reputation point to post more then 1 link ;)</p>