How to dynamically load foundation orbit?
问题 In my javascript, if the window is a specific width, add the data-orbit attribute to my intended slider. This fires on $(window).resize() and $(function(){}) . The condensed version... var ui = { mobile : function() { var i = 0; if($(window).width() <= 568) { this.resizeOffers(); } else { this.mobileClear(); } }, resizeOffers : function() { $('#offers .inner').attr('data-orbit', ""); }, mobileClear : function() { $('#offers .inner').removeAttr('data-orbit'); } } Everything works great if you