title: jQuery(...).plugin is not a function because js file is not loaded
body: <p>I use a plugin (in this example it is selectric). I only load the plugin javascript file on product pages.</p>
  
  <p>The code I use is: <code>jQuery('.myselectpicker').selectric({});</code> and is located in a custom javascript file witch is loaded on every page.</p>
  
  <p>If I go to an other page then the product page, I get a <code>jQuery(...).selectric is not a function</code> error.  </p>
  
  <p>I understand why I get the error, because the plugin javascript file is not included in the head (only on product pages).  </p>
  
  <p>But is there something I can put around the <code>jQuery('.myselectpicker').selectric({});</code>  code so it doesn't return an error on other pages than the product page?<br>
  I don't want to add the code to the plugin javscript file or in a seperate javascript file only loaded on the product page.<br>
  And for performance reasons I don't want to include all javascript files on every page type.</p>