Head JS - Smart external scripts on demand


/ Published in: jQuery
Save to your folder(s)

Loading external scripts on demand the smart way with Head JS


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.