我正在尝试通过每个模块加载来更改我的网站的背景。它在不导入引导程序的情况下完美运行,但是一旦我尝试导入引导程序,它似乎
$('html').css({"background":background})
只对不使用 Twitter 引导程序的部分有效。
我觉得只有在导入 Twitter 引导程序时才应该更改背景。这里是截图:https ://www.dropbox.com/s/ztcx56p9b7twq8b/Screen%20Shot%202012-12-18%20at%203.35.21%20PM.png?m
<!DOCTYPE html>
<html>
<head>
<script src="/javascripts/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/javascripts/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="/javascripts/background_decider.js"></script>
<link rel='stylesheet' href='/stylesheets/css/bootstrap.min.css'/>
<link rel='stylesheet' href='/stylesheets/style.css' />
</head>
<body>
<script type="text/javascript">
window.onload = function() {
window.setTimeout(function () {
var background = select_background();
$('html').css({"background":background});
}, 0);
};
</script>
<div class="title">
<form class="form-horizontal">
<div class="control-group">
<div class="controls">
<label class="control-label" for="inputEmail">Email</label>
<input type="text" id="inputEmail" placeholder="Email">
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="control-label" for="inputPassword">Password</label>
<input type="password" id="inputPassword" placeholder="Password">
</div>
</div>
</form>
</div>
</body>
</html>