Commit 16500287 authored by Nikolay Gromov's avatar Nikolay Gromov

show code

parent 54939a91
$( document ).ready(function() {
$('.js-library-code-toggler').on('click', function(){
$(this).closest('.js-library-code-parent').find('.js-library-code').slideToggle();
});
});
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
top: 0; top: 0;
left: -4rem; left: -4rem;
width: 3rem; width: 3rem;
height: 3rem; height: 2rem;
cursor: pointer; cursor: pointer;
} }
...@@ -85,8 +85,11 @@ ...@@ -85,8 +85,11 @@
} }
&__code { &__code {
max-height: 0; display: none;
overflow: hidden;
pre {
margin: 0;
}
} }
} }
...@@ -1542,9 +1542,9 @@ ...@@ -1542,9 +1542,9 @@
<input type="submit" class="btn btn--danger" value="Input"> <input type="submit" class="btn btn--danger" value="Input">
<button class="btn btn--danger">Button</button> <button class="btn btn--danger">Button</button>
</p> </p>
<div class="blocks-library__code-wrapper"> <div class="blocks-library__code-wrapper js-library-code-parent">
<span class="blocks-library__code-show-trigger" title="Показать код"><i class="blocks-library__code-icon"></i></span> <span class="blocks-library__code-show-trigger js-library-code-toggler" title="Показать код"><i class="blocks-library__code-icon"></i></span>
<div class="blocks-library__code"> <div class="blocks-library__code js-library-code">
<pre> <pre>
<code class="html">&lt;input type="text" value="Текстовое поле для сравнения высоты" style="width:70px"&gt;</code> <code class="html">&lt;input type="text" value="Текстовое поле для сравнения высоты" style="width:70px"&gt;</code>
<code class="html"> </code> <code class="html"> </code>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment