diff --git a/docs/guide/js/index.js b/docs/guide/js/index.js index dacc81e0..6d937975 100644 --- a/docs/guide/js/index.js +++ b/docs/guide/js/index.js @@ -59,4 +59,39 @@ context: '.col-md-9' }); + // Add View Code toggle button for each example + $('.guide-example').each(function() { + + var btn = '' + + '
' + + '
' + + '
' + + '' + + '
' + + '
'; + + if ($(this).next().is('.language-markup')) { + $(this).append($(btn)); + } + }); + + $('[data-toggle="code"]').click(function(e) { + + e.preventDefault(); + + var target = $(this).parents('.guide-example').next('.language-markup'); + + if(target.is(':visible')) { + target.velocity("slideUp", { duration: 200 }); + }else { + target.velocity("fadeIn", { + duration: 300, + display: 'block' + }); + } + + }); + })(jQuery); diff --git a/docs/guide/templates/partials/default-footer.hbs b/docs/guide/templates/partials/default-footer.hbs index 56b9399e..f532bccd 100644 --- a/docs/guide/templates/partials/default-footer.hbs +++ b/docs/guide/templates/partials/default-footer.hbs @@ -1,6 +1,7 @@ + diff --git a/lib/ui/mask/docs/mask-ui-demo.html b/lib/ui/mask/docs/mask-ui-demo.html index 09e4a8ea..fd7d6742 100644 --- a/lib/ui/mask/docs/mask-ui-demo.html +++ b/lib/ui/mask/docs/mask-ui-demo.html @@ -68,43 +68,42 @@ - -
-
-
- - -
-
- - -
-
- - -
-
- - -
-
-
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ +