aboutsummaryrefslogtreecommitdiff
path: root/examples/assets
diff options
context:
space:
mode:
authorJacob Thornton <[email protected]>2011-08-27 21:46:50 -0700
committerJacob Thornton <[email protected]>2011-08-27 21:46:50 -0700
commited96f181c89a4bb152d58b5c9753ee5aedbd8c4b (patch)
treec0e5b3efebdae05ef1a8c4fae38c6e55f294725b /examples/assets
parente91353f36286d7d7d2fdde4d6107f7ecc4c815d6 (diff)
downloadbootstrap-ed96f181c89a4bb152d58b5c9753ee5aedbd8c4b.tar.xz
bootstrap-ed96f181c89a4bb152d58b5c9753ee5aedbd8c4b.zip
add topbar dropdown js
Diffstat (limited to 'examples/assets')
-rw-r--r--examples/assets/css/bootstrap-js.css36
-rw-r--r--examples/assets/js/bootstrap-dropdown.js22
2 files changed, 58 insertions, 0 deletions
diff --git a/examples/assets/css/bootstrap-js.css b/examples/assets/css/bootstrap-js.css
new file mode 100644
index 000000000..1c741e3cb
--- /dev/null
+++ b/examples/assets/css/bootstrap-js.css
@@ -0,0 +1,36 @@
+body {
+ padding-bottom: 60px;
+}
+/* Topbar special styles
+-------------------------------------------------- */
+div.topbar-wrapper {
+ position: relative;
+ height: 40px;
+ margin: 5px 0 15px;
+}
+div.topbar-wrapper div.topbar {
+ position: absolute;
+ margin: 0 -20px;
+}
+
+div.topbar-wrapper div.topbar .fill {
+ padding-left: 20px;
+ padding-right: 20px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+div.topbar-wrapper .container {
+ width: auto;
+}
+
+/* Pretty Print
+-------------------------------------------------- */
+PRE.prettyprint {
+ overflow: hidden;
+}
+
+section {
+ padding-top: 60px;
+} \ No newline at end of file
diff --git a/examples/assets/js/bootstrap-dropdown.js b/examples/assets/js/bootstrap-dropdown.js
new file mode 100644
index 000000000..fd5bd7978
--- /dev/null
+++ b/examples/assets/js/bootstrap-dropdown.js
@@ -0,0 +1,22 @@
+(function( $ ){
+
+ /* DROPDOWN PLUGIN DEFINITION
+ * ========================== */
+
+ function clearMenus() {
+ $('a.menu').parent('li').removeClass('open')
+ }
+
+ $(window).bind("click", clearMenus)
+
+ $.fn.dropdown = function ( options ) {
+ return this.each(function () {
+ $(this).delegate('a.menu', 'click', function (e) {
+ clearMenus()
+ $(this).parent('li').toggleClass('open')
+ return false
+ })
+ })
+ }
+
+})( jQuery || ender ) \ No newline at end of file