mirror of
https://github.com/tabler/tabler-icons.git
synced 2025-03-15 16:49:43 +01:00
icon manager js
This commit is contained in:
parent
4fcdf32cff
commit
3db680efcf
13
index.html
13
index.html
@ -20,7 +20,7 @@
|
||||
{% include icon.html name=last-icon.slug %}
|
||||
{% endcapture %}
|
||||
|
||||
<div class="row mb">
|
||||
<div class="row mb js-icon-manager">
|
||||
<div class="col">
|
||||
|
||||
<div class="icon-preview-wrap">
|
||||
@ -74,7 +74,7 @@
|
||||
<div>
|
||||
<div class="icons-list">
|
||||
{% for icon in site.icons %}
|
||||
<a href="#" class="icons-list-icon" title="{{ icon.slug }}">
|
||||
<a href="#" class="icons-list-icon js-icon" title="{{ icon.slug }}">
|
||||
{% assign name = icon.slug %}
|
||||
{% include icon.html name=name %}
|
||||
</a>
|
||||
@ -84,10 +84,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
|
||||
<script>
|
||||
(function(){
|
||||
|
||||
})();
|
||||
$(document).ready(function(){
|
||||
$('body').on('click', '.js-icon', function(){
|
||||
$('.js-icon-manager svg').replaceWith($(this).find('>svg:eq(0)').clone());
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user