Posted By

kevinlearynet on 05/05/11


Tagged

ajax javascript jquery external headjs


Versions (?)

Head JS - Smart external scripts on demand


 / Published in: jQuery
 

Loading external scripts on demand the smart way with Head JS

  1. var carousel = $(".carousel");
  2. if ( carousel.length > 0 ){
  3. head.js("js/jcarousel.jquery.min.js", function() {
  4. carousel.jcarousel({
  5. wrap: 'circular',
  6. visible: 4,
  7. easing: 'swing',
  8. scroll: 2,
  9. animation: 800,
  10. initCallback: function(){
  11. carousel.removeClass('clipped');
  12. }
  13. });
  14. });
  15. }

Report this snippet  

You need to login to post a comment.