Skip to content
Snippets Groups Projects
Commit 601f6fbd authored by Michael Lee's avatar Michael Lee
Browse files

Adjust BuckeyeAlert jQuery so it can properly load

parent d019705f
1 merge request!167Adjust BuckeyeAlert jQuery so it can properly load
...@@ -3,19 +3,18 @@ ...@@ -3,19 +3,18 @@
attach: function (context, settings) { attach: function (context, settings) {
// Only add alert if page is not embedded in another // Only add alert if page is not embedded in another
if (window.location == window.parent.location) { if (window.location == window.parent.location) {
$('body', context).once('buckeye-alert-init').prepend('<div id="buckeye_alert"></div>'); $(once('buckeye-alert-init', 'body', context)).prepend('<div id="buckeye_alert"></div>');
$(once('buckeye-alert', '#buckeye_alert')).buckeyeAlert({
$("#buckeye_alert").once('buckeye-alert').buckeyeAlert({
url: drupalSettings.buckeye_alert.feed_url, url: drupalSettings.buckeye_alert.feed_url,
messageClass: drupalSettings.buckeye_alert.messageClass, messageClass: drupalSettings.buckeye_alert.messageClass,
animate: drupalSettings.buckeye_alert.animate, animate: drupalSettings.buckeye_alert.animate,
callback: function() { callback: function () {
if (drupalSettings.buckeye_alert.additional) { if (drupalSettings.buckeye_alert.additional) {
$("#buckeye_alert").find("#buckeye_alert_msg").append('<div id="buckeye_alert_extra">'+drupalSettings.buckeye_alert.additional+'</div>'); $("#buckeye_alert").find("#buckeye_alert_msg").append('<div id="buckeye_alert_extra">' + drupalSettings.buckeye_alert.additional + '</div>');
} }
} }
}); });
} }
} }
}; };
})(jQuery, Drupal, drupalSettings); })(jQuery, Drupal, drupalSettings);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment