How to check if a plugin's function exists?
<p>I have this code:</p>

<pre><code>$(document).ready(function() {
    $('.tabs-container').tabs({ 
        tabs: '.bar', 
        tabs_container: '.foo' 
    });
});
</code></pre>

<p>Sometimes the tabs plugin script isn't loaded which causes the rest of the page's js to break due to this error in the console:</p>

<pre><code>TypeError: $(...).tabs is not a function
</code></pre>

<p>How can I check to see if tabs function exists before attaching that plugin to an element?</p>
