title: wordpress: loading javascript only where shortcode appears
body: <p>have an interesting conundrum. I need to load about 8 javascript files and the same number of styles for my plugin. These are only needed where ever my shortcode is ran.</p>
  
  <p>I've tried to load them with print_styles and print_scripts but they aren't rendering properly, plus to do so breaks xhtml validation. So at the moment they load on every page and due to the number of files needed its not feasible to leave it like this. </p>
  
  <p>On another project I wrote a function into my plugin's index.php file that would take the current page, search it for my shortcode and if found only then would it print the scripts, but this is an ugly hack.</p>
  
  <p>Has anybody got any suggestions or solutions?
  any help would be appreciated,
  regards,
  Daithi</p>