Browse Source

fixes logic for more complex example source

pull/13/head
Jack Lukic 11 years ago
parent
commit
cf2802ce7a
2 changed files with 8 additions and 1 deletions
  1. 3
      docs/form.html
  2. 6
      docs/javascript/semantic.js

3
docs/form.html

@ -180,6 +180,9 @@
</div>
<div class="ui blue submit button">Submit</div>
</div>
<div class="annotated">
<p>This example uses a ui segment to add the padding and background color. This is not required.</p>
</div>
</div>
<h3>Types of Content</h3>

6
docs/javascript/semantic.js

@ -42,12 +42,16 @@ semantic.ready = function() {
var
$example = $(this).closest('.example'),
$shape = $example.find('.shape.module'),
$demo = $example.children().slice(2).not('.annotated'),
$demo = $example.children().slice(3).not('.annotated'),
$annotated = $example.find('.annotated'),
$code = $annotated.find('.code'),
whiteSpace = new RegExp('\\n\\s{4}', 'g'),
code = ''
;
// if ui has wrapper use that
if($demo.filter('.ui').size() === 0) {
$demo = $example.children().eq(3).children();
}
// add source if doesnt exist and initialize
if($annotated.size() === 0) {
$annotated = $('<div/>')

Loading…
Cancel
Save