Commits

Nelson Reis committed 233dcc4

fix #19 add script to prevent scroll on button clicks (type=submit)

  • Participants
  • Parent commits 736ae25

Comments (0)

Files changed (4)

 <script type="text/javascript" src="docs/jquery.validate.js"></script>
 <script type="text/javascript" src="docs/jquery.validate.unobtrusive.js"></script>
 <script type="text/javascript" src="docs/jquery.unobtrusive-ajax.js"></script>
+<script type="text/javascript" src="docs/metro-bootstrap/metro-docs.js"></script>
 <script type="text/javascript"> 
 
   var _gaq = _gaq || [];
 <script type="text/javascript" src="docs/jquery.validate.js"></script>
 <script type="text/javascript" src="docs/jquery.validate.unobtrusive.js"></script>
 <script type="text/javascript" src="docs/jquery.unobtrusive-ajax.js"></script>
+<script type="text/javascript" src="docs/metro-bootstrap/metro-docs.js"></script>
 <script type="text/javascript"> 
 
   var _gaq = _gaq || [];

docs/metro-bootstrap/metro-docs.js

+/* =====================================================
+ * NOTE: THIS JAVASCRIPT IS ONLY TO BE USED IN OUR DOCS.
+ * DO NOT INCLUDE THIS ON YOUR APP.
+ * ===================================================== */
+
+!function ($) {
+
+  $(function () {
+
+    $(":submit").click(function (e) {
+		e.preventDefault()
+    })
+	
+  })
+
+}(window.jQuery);
 <script type="text/javascript" src="docs/jquery.validate.js"></script>
 <script type="text/javascript" src="docs/jquery.validate.unobtrusive.js"></script>
 <script type="text/javascript" src="docs/jquery.unobtrusive-ajax.js"></script>
- 
+<script type="text/javascript" src="docs/metro-bootstrap/metro-docs.js"></script>
 <script type="text/javascript">
 
   var _gaq = _gaq || [];