aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcodecalm <codecalm@gmail.com>2020-02-28 12:14:03 +0100
committercodecalm <codecalm@gmail.com>2020-02-28 12:14:03 +0100
commit3db680efcfa87ec56b039ec1802d309d334904bd (patch)
treed7c5a1ac0aec51b4e445216a5b174322d0e31ae3
parentcss fix (diff)
downloadtabler-icons-3db680efcfa87ec56b039ec1802d309d334904bd.tar.xz
icon manager js
-rw-r--r--index.html13
1 files changed, 8 insertions, 5 deletions
diff --git a/index.html b/index.html
index cb8efeb0..24421652 100644
--- a/index.html
+++ b/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>