' * Bootstrap v3.1.0 (http://getbootstrap.com)\n' +
' * Copyright 2011-2014 Twitter, Inc.\n' +
' * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n' +
- ' */\n\n';
+ ' */\n\n'
function showError(msg, err) {
$('<div id="bsCustomizerAlert" class="bs-customizer-alert">\
}
function getQueryParam(key) {
- key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, '\\$&'); // escape RegEx meta chars
- var match = location.search.match(new RegExp('[?&]' + key + '=([^&]+)(&|$)'));
- return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
+ key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, '\\$&') // escape RegEx meta chars
+ var match = location.search.match(new RegExp('[?&]' + key + '=([^&]+)(&|$)'))
+ return match && decodeURIComponent(match[1].replace(/\+/g, ' '))
}
function createGist(configJson) {
-$(document).ready(function() {
- $('[data-toggle=offcanvas]').click(function() {
- $('.row-offcanvas').toggleClass('active');
+$(document).ready(function () {
+ $('[data-toggle=offcanvas]').click(function () {
+ $('.row-offcanvas').toggleClass('active')
});
});
\ No newline at end of file
<p>On <code><select></code> elements, the Android stock browser will not display the side controls if there is a <code>border-radius</code> and/or <code>border</code> applied. Use the snippet of code below to remove the offending CSS and render the <code><select></code> as an unstyled element on the Android stock browser. The user agent sniffing avoids interference with Chrome, Safari, and Mozilla browsers.</p>
{% highlight html %}
<script>
-var nua = navigator.userAgent;
-var isAndroid = (nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1 && nua.indexOf('Chrome') === -1);
+var nua = navigator.userAgent
+var isAndroid = (nua.indexOf('Mozilla/5.0') > -1 && nua.indexOf('Android ') > -1 && nua.indexOf('AppleWebKit') > -1 && nua.indexOf('Chrome') === -1)
if (isAndroid) {
- $('select.form-control').removeClass('form-control').css('width', '100%');
+ $('select.form-control').removeClass('form-control').css('width', '100%')
}
</script>
{% endhighlight %}
</button>
<script>
$('#loading-example-btn').click(function () {
- var btn = $(this);
- btn.button('loading');
+ var btn = $(this)
+ btn.button('loading')
$.ajax(...).always(function () {
- btn.button('reset');
+ btn.button('reset')
});
});
</script>
<button id="loading-example-btn" type="button" class="btn btn-primary" data-loading-text="loading stuff...">...</button>
<script>
$('#loading-example-btn').click(function () {
- var btn = $(this);
- btn.button('loading');
+ var btn = $(this)
+ btn.button('loading')
$.ajax(...).always(function () {
- btn.button('reset');
+ btn.button('reset')
});
});
</script>