$('.bs-top').affix()
}, 100)
- // add-ons
- $('.add-on :checkbox').on('click', function () {
- var $this = $(this)
- , method = $this.attr('checked') ? 'addClass' : 'removeClass'
- $(this).parents('.add-on')[method]('active')
- })
-
// add tipsies to grid for scaffolding
if ($('#grid-system').length) {
$('#grid-system').tooltip({
$('.bs-docs-carousel-example').carousel()
// javascript build logic
- var inputsComponent = $("#components.download input")
- , inputsPlugin = $("#plugins.download input")
- , inputsVariables = $("#variables.download input")
+ var inputsComponent = $("#components input")
+ , inputsPlugin = $("#plugins input")
+ , inputsVariables = $("#variables input")
// toggle all plugin checkboxes
- $('#components.download .toggle-all').on('click', function (e) {
+ $('#components .toggle').on('click', function (e) {
e.preventDefault()
- inputsComponent.attr('checked', !inputsComponent.is(':checked'))
+ inputsComponent.prop('checked', !inputsComponent.is(':checked'))
})
- $('#plugins.download .toggle-all').on('click', function (e) {
+ $('#plugins .toggle').on('click', function (e) {
e.preventDefault()
- inputsPlugin.attr('checked', !inputsPlugin.is(':checked'))
+ inputsPlugin.prop('checked', !inputsPlugin.is(':checked'))
})
- $('#variables.download .toggle-all').on('click', function (e) {
+ $('#variables .toggle').on('click', function (e) {
e.preventDefault()
inputsVariables.val('')
})
// request built javascript
$('.download-btn .btn').on('click', function () {
- var css = $("#components.download input:checked")
+ var css = $("#components input:checked")
.map(function () { return this.value })
.toArray()
- , js = $("#plugins.download input:checked")
+ , js = $("#plugins input:checked")
.map(function () { return this.value })
.toArray()
, vars = {}
, img = ['glyphicons-halflings.png', 'glyphicons-halflings-white.png']
- $("#variables.download input")
+ $("#variables input")
.each(function () {
$(this).val() && (vars[ $(this).prev().text() ] = $(this).val())
})
<!-- Customize
================================================== -->
- <form>
+ <form class="bs-customizer">
<div class="bs-docs-section" id="components">
<div class="page-header">
- <a class="btn btn-default pull-right toggle-all" href="#">Toggle all</a>
+ <button class="btn btn-default toggle" type="button">Toggle all</button>
<h1>LESS components</h1>
</div>
<p class="lead">Choose which LESS files should be compiled into your custom stylesheets.</p>
</div>
</div>
</div>
-
+
<div class="bs-docs-section" id="plugins">
<div class="page-header">
- <a class="btn btn-default pull-right toggle-all" href="#">Toggle all</a>
+ <button class="btn btn-default toggle" type="button">Toggle all</button>
<h1>jQuery plugins</h1>
</div>
<p class="lead">Choose which jQuery plugins should be included in your custom JavaScript files.</p>
<p>All checked plugins will be compiled into a single file, bootstrap.js. All plugins require the latest version of <a href="http://jquery.com/" target="_blank">jQuery</a> to be included.</p>
</div>
</div>
-
-
+
+
<div class="bs-docs-section" id="variables">
<div class="page-header">
- <a class="btn btn-default pull-right toggle-all" href="#">Reset to defaults</a>
+ <button class="btn btn-default toggle" type="button">Reset to defaults</button>
<h1>LESS variables</h1>
</div>
<p class="lead">Customize LESS variables to define colors, sizes and more inside your custom CSS stylesheets.</p>