mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-06 13:46:42 +02:00
Add the jquery check in customizer's output.
This commit is contained in:
@@ -295,6 +295,8 @@ window.onload = function () { // wait for load in a dumb way because B-0
|
|||||||
|
|
||||||
function generateJS(preamble) {
|
function generateJS(preamble) {
|
||||||
var $checked = $('#plugin-section input:checked')
|
var $checked = $('#plugin-section input:checked')
|
||||||
|
var jqueryCheck = 'if (typeof jQuery === "undefined") { throw new Error("Bootstrap\'s JavaScript requires jQuery") }\n\n'
|
||||||
|
|
||||||
if (!$checked.length) return false
|
if (!$checked.length) return false
|
||||||
|
|
||||||
var js = $checked
|
var js = $checked
|
||||||
@@ -302,6 +304,8 @@ window.onload = function () { // wait for load in a dumb way because B-0
|
|||||||
.toArray()
|
.toArray()
|
||||||
.join('\n')
|
.join('\n')
|
||||||
|
|
||||||
|
js = jqueryCheck + js
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'bootstrap.js': preamble + js,
|
'bootstrap.js': preamble + js,
|
||||||
'bootstrap.min.js': preamble + cw + uglify(js)
|
'bootstrap.min.js': preamble + cw + uglify(js)
|
||||||
|
Reference in New Issue
Block a user