aboutsummaryrefslogtreecommitdiff
path: root/docs/assets/js
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2012-01-23 14:14:16 -0800
committerJacob Thornton <[email protected]>2012-01-23 14:14:16 -0800
commitf764aee4b919c28974dba7b91edac9a04172ba25 (patch)
tree1499bc8475fde954d88bbd0f284bc9906488db8f /docs/assets/js
parent1209a3756c88043008950f74dd287b837e00f7d8 (diff)
downloadbootstrap-f764aee4b919c28974dba7b91edac9a04172ba25.tar.xz
bootstrap-f764aee4b919c28974dba7b91edac9a04172ba25.zip
add templates for doc generation
Diffstat (limited to 'docs/assets/js')
-rw-r--r--docs/assets/js/application.js87
1 files changed, 58 insertions, 29 deletions
diff --git a/docs/assets/js/application.js b/docs/assets/js/application.js
index ba5a26947..93f7ea719 100644
--- a/docs/assets/js/application.js
+++ b/docs/assets/js/application.js
@@ -117,37 +117,66 @@ $(function(){
})
+// JS for javascript demos
+$(function () {
+ // tooltip demo
+ $('.tooltip-demo.well').tooltip({
+ selector: "a[rel=tooltip]"
+ })
+ $('.tooltip-test').tooltip()
+
+ // popover demo
+ $("a[rel=popover]")
+ .popover()
+ .click(function(e) {
+ e.preventDefault()
+ })
+
+ // button state demo
+ $('#fat-btn')
+ .click(function () {
+ var btn = $(this)
+ btn.button('loading')
+ setTimeout(function () {
+ btn.button('reset')
+ }, 3000)
+ })
+
+ // carousel demo
+ $('#myCarousel').carousel()
+})
+
// Modified from the original jsonpi https://github.com/benvinegar/jquery-jsonpi
// by the talented Ben Vinegar
!function($) {
- $.ajaxTransport('jsonpi', function(opts, originalOptions, jqXHR) {
- var url = opts.url;
-
- return {
- send: function(_, completeCallback) {
- var name = 'jQuery_iframe_' + jQuery.now(),
- iframe, form;
-
- iframe = $('<iframe>')
- .attr('name', name)
- .appendTo('head');
-
- form = $('<form>')
- .attr('method', opts.type) // GET or POST
- .attr('action', url)
- .attr('target', name);
-
- $.each(opts.params, function(k, v) {
- $('<input>')
- .attr('type', 'hidden')
- .attr('name', k)
- .attr('value', v)
- .appendTo(form);
- });
-
- form.appendTo('body').submit();
- }
- };
- });
+ $.ajaxTransport('jsonpi', function(opts, originalOptions, jqXHR) {
+ var url = opts.url;
+
+ return {
+ send: function(_, completeCallback) {
+ var name = 'jQuery_iframe_' + jQuery.now()
+ , iframe, form
+
+ iframe = $('<iframe>')
+ .attr('name', name)
+ .appendTo('head')
+
+ form = $('<form>')
+ .attr('method', opts.type) // GET or POST
+ .attr('action', url)
+ .attr('target', name)
+
+ $.each(opts.params, function(k, v) {
+ $('<input>')
+ .attr('type', 'hidden')
+ .attr('name', k)
+ .attr('value', v)
+ .appendTo(form)
+ });
+
+ form.appendTo('body').submit()
+ }
+ }
+ })
}(jQuery); \ No newline at end of file