Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions _static/js/jquery-fix.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Override of sphinx_bootstrap_theme's bundled jquery-fix.js.
//
// The theme loads scripts in this order: jquery, jquery-fix.js,
// bootstrap.min.js, bootstrap-sphinx.js. The upstream jquery-fix.js calls
// jQuery.noConflict(true), which removes *both* window.jQuery and window.$
// before bootstrap.min.js runs. bootstrap.min.js grabs the global `jQuery`
// symbol to attach its plugins (carousel, dropdown, collapse, ...), so it
// crashes immediately and none of them get attached - breaking, among other
// things, the front-page carousel (GenericMappingTools/website#146).
//
// Calling noConflict() without `true` only releases the `$` alias and keeps
// window.jQuery defined, so bootstrap.min.js still works. bootstrap-sphinx.js
// already prefers window.$jqTheme, so behavior for the theme's own script is
// unchanged.
window.$jqTheme = jQuery.noConflict();
Loading