aboutsummaryrefslogtreecommitdiff
path: root/docs/assets/js/application.js
diff options
context:
space:
mode:
authorIvan Khalopik <[email protected]>2013-05-27 11:06:31 +0300
committerIvan Khalopik <[email protected]>2013-05-27 11:06:31 +0300
commit3285f4c3062f4a56eaed2461a3128a2e6a3ba9cc (patch)
tree5fa0a3d3556a83cd96147da46e90ae9f361d8efc /docs/assets/js/application.js
parent3c7a43a1f373d0c534476578b96a75ae2e63c985 (diff)
parent7cbb1c0452a1d9904f7655aea78644def85b7f2e (diff)
downloadbootstrap-3285f4c3062f4a56eaed2461a3128a2e6a3ba9cc.tar.xz
bootstrap-3285f4c3062f4a56eaed2461a3128a2e6a3ba9cc.zip
Merge remote-tracking branch 'bootstrap/3.0.0-wip' into 3.0.0-wip
Conflicts: js/bootstrap-collapse.js
Diffstat (limited to 'docs/assets/js/application.js')
-rw-r--r--docs/assets/js/application.js50
1 files changed, 20 insertions, 30 deletions
diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js
index 170a1953d..30a7c0d6e 100644
--- a/docs/assets/js/application.js
+++ b/docs/assets/js/application.js
@@ -14,28 +14,18 @@
})
// back to top
- // setTimeout(function () {
- // $('.bs-docs-sidenav').affix({
- // offset: {
- // top: function () { return $window.width() <= 980 ? 290 : 210 }
- // , bottom: 270
- // }
- // })
- // }, 100)
-
setTimeout(function () {
- $('.bs-docs-top').affix()
+ $('.bs-sidebar').affix({
+ offset: {
+ top: function () { return $window.width() <= 980 ? 290 : 210 }
+ , bottom: 270
+ }
+ })
}, 100)
- // make code pretty
- window.prettyPrint && prettyPrint()
-
- // add-ons
- $('.add-on :checkbox').on('click', function () {
- var $this = $(this)
- , method = $this.attr('checked') ? 'addClass' : 'removeClass'
- $(this).parents('.add-on')[method]('active')
- })
+ setTimeout(function () {
+ $('.bs-top').affix()
+ }, 100)
// add tipsies to grid for scaffolding
if ($('#grid-system').length) {
@@ -79,22 +69,22 @@
$('.bs-docs-carousel-example').carousel()
// javascript build logic
- var inputsComponent = $("#components.download input")
- , inputsPlugin = $("#plugins.download input")
- , inputsVariables = $("#variables.download input")
+ var inputsComponent = $("#less 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('')
})
@@ -102,16 +92,16 @@
// 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())
})