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
No related branches found
No related tags found
1 merge request!167Adjust BuckeyeAlert jQuery so it can properly load
......@@ -3,19 +3,18 @@
attach: function (context, settings) {
// Only add alert if page is not embedded in another
if (window.location == window.parent.location) {
$('body', context).once('buckeye-alert-init').prepend('<div id="buckeye_alert"></div>');
$("#buckeye_alert").once('buckeye-alert').buckeyeAlert({
$(once('buckeye-alert-init', 'body', context)).prepend('<div id="buckeye_alert"></div>');
$(once('buckeye-alert', '#buckeye_alert')).buckeyeAlert({
url: drupalSettings.buckeye_alert.feed_url,
messageClass: drupalSettings.buckeye_alert.messageClass,
animate: drupalSettings.buckeye_alert.animate,
callback: function() {
callback: function () {
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