Browse Source

testing

master
Pascal Gloor 5 years ago
parent
commit
0facd91c17
2 changed files with 10 additions and 16 deletions
  1. 8
    8
      www/index.html
  2. 2
    8
      www/js/autodoc.js

+ 8
- 8
www/index.html View File

<input type="text" placeholder="Tag name" class="autodoc_tag_text"> <input type="text" placeholder="Tag name" class="autodoc_tag_text">
</td> </td>
<td> <td>
<a href="#" class="autodoc_tag_color badge badge-primary">Primary<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-secondary">Secondary<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-success">Success<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-danger">Danger<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-primary" data="primary">Primary<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-secondary" data="secondary">Secondary<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-success" data="success">Success<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-danger" data="danger">Danger<span></span></a>
<br /> <br />
<a href="#" class="autodoc_tag_color badge badge-warning">Warning<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-info">Info<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-light">Light<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-dark">Dark<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-warning" data="warning">Warning<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-info" data="info">Info<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-light" data="light">Light<span></span></a>
<a href="#" class="autodoc_tag_color badge badge-dark" data="dark">Dark<span></span></a>
</td> </td>
<td> <td>
<span id="autodoc_tag_result" class="badge"></span> <span id="autodoc_tag_result" class="badge"></span>

+ 2
- 8
www/js/autodoc.js View File

$(e.target).parent().children().children().html(''); $(e.target).parent().children().children().html('');
$(e.target).children().html(' X'); $(e.target).children().html(' X');
$('#autodoc_tag_result').attr('class').each(function(myclass) {
$('#autodoc_tag_result').removeClass(myclass);
})
$(e.target).attr('class').split(/ /).each(function(myclass) {
$('#autodoc_tag_result').addClass(myclass);
});

return false; return false;
}) })


$('.autodoc_tag_text').keypress(function(e) { $('.autodoc_tag_text').keypress(function(e) {
console.log(e);
$('#autodoc_tag_result').html($(e.target).html());
$('#autodoc_tag_result').html($(e.target).val());
}); });
}); });



Loading…
Cancel
Save