(function($){ Drupal.behaviors.osf_timeline = { attach: function(context, settings){ if($('#timeline-wrapper').length>0){ /** * You can change any of the configuration options or just initialize with the standard markup/JS * Shouldn't need to change anything but if you create a custom timeline, it's configurable * $('#timeline-wrapper').timeline({'eventSelector' : '.event'}); */ $('#timeline-wrapper').timeline(); } } }; //end behavior })(jQuery);