]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
made top-bar go to normal position when 'fixed' and clicked
authorzurbchris <chris@zurb.com>
Thu, 14 Mar 2013 22:30:51 +0000 (15:30 -0700)
committerzurbchris <chris@zurb.com>
Thu, 14 Mar 2013 22:30:51 +0000 (15:30 -0700)
docs/components/top-bar.html.erb
docs/layout.html.erb
js/foundation/foundation.topbar.js

index 767ec751b77b4fca609bd731ffe7fb9c9f4c36f0..a7d7d84fc2f3b47fcd1cb6ee6c7a25d2de49c41f 100644 (file)
@@ -8,7 +8,7 @@
       <div class="large-12 columns">
         <h1><%= @page_title %></h1>
         <h4 class="subheader">The Foundation Top Bar gives you a great way to display a complex navigation bar on small or large screens.</h4>
-        <div class="sticky">
+
         <nav class="top-bar">
           <ul class="title-area">
             <!-- Title Area -->
@@ -68,7 +68,6 @@
             </ul>
           </section>
         </nav>
-        </div>
 
         <hr>
       </div>
index d6609cd8647d2527c7a558f840ddcb198d7c7144..5759c1b854e24fe9ab92a7d15745ab4a75475797 100644 (file)
@@ -10,6 +10,8 @@
     <script src="<%= asset_path %>/vendor/custom.modernizr.js"></script>
   </head>
   <body class="antialiased">
+
+    <div class="fixed">
     <nav class="top-bar">
       <ul class="title-area">
         <!-- Title Area -->
       <section class="top-bar-section">
         <!-- Right Nav Section -->
         <ul class="right">
-          <li><a href="<%= features_path %>">Features</a></li>
-          <li><a href="<%= features_path %>">Features</a></li>
-          <li><a href="<%= features_path %>">Features</a></li>
-          <li><a href="<%= features_path %>">Features</a></li>
-          <li><a href="<%= features_path %>">Features</a></li>
-          <li><a href="<%= features_path %>">Features</a></li>
-          <li><a href="<%= features_path %>">Features</a></li>
-          <li><a href="<%= features_path %>">Features</a></li>
           <li class="divider"></li>
           <li><a href="<%= features_path %>">Features</a></li>
           <li class="divider"></li>
@@ -46,6 +40,7 @@
         </ul>
       </section>
     </nav>
+    </div>
 
     <% @page_title = "4 Documentation" %>
     <div class="row">
index a9ed6931f42b41c5c3ea252cb60162e834976e78..98ab12ef99b7d9f6daca4f3cfd7179eb47d3af58 100644 (file)
             $('body').css('padding-top','0');
             window.scrollTo(0);
           } else {
-            topbar.parent().toggleClass('fixed');
+            topbar.parent().addClass('fixed');
             $('body').css('padding-top',offst);
           }
 
-          // check for sticky
-          this.sticky();
-
         })
 
         .on('click.fndtn.topbar', '.top-bar .has-dropdown>a', function (e) {
       // Put element back in the DOM
       this.settings.$section.appendTo(this.settings.$topbar);
 
+      // check for sticky
+      this.sticky();
     },
 
     largestUL : function () {