diff options
| author | Kumar Priyansh <[email protected]> | 2019-06-19 14:27:29 +0530 |
|---|---|---|
| committer | Kumar Priyansh <[email protected]> | 2019-06-19 14:27:29 +0530 |
| commit | 43ea2d744c1dc8f51faf785bf8d97c560014426a (patch) | |
| tree | 7d27832d18842064af68797be7af33a9e1fa5954 /src/scripts | |
| parent | ffaabdc04c5508ce8537d9031656ac1b388a6433 (diff) | |
| download | authorr-43ea2d744c1dc8f51faf785bf8d97c560014426a.tar.xz authorr-43ea2d744c1dc8f51faf785bf8d97c560014426a.zip | |
Added Template Selection Functionality
Diffstat (limited to 'src/scripts')
| -rw-r--r-- | src/scripts/starterWindow.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/scripts/starterWindow.js b/src/scripts/starterWindow.js index e69de29..03afd8b 100644 --- a/src/scripts/starterWindow.js +++ b/src/scripts/starterWindow.js @@ -0,0 +1,20 @@ +$(document).ready(function(){ + $('.nav-group').on('click', 'span', function() { + $('.nav-group span.active').removeClass('active'); + $(this).addClass('active'); + }); + $('.templateIcon').click(function(e){ + $('.template .templateIcon').removeClass('clicked'); + $('.template .templateName span').removeClass('clickedText'); + $(this).addClass('clicked'); + var parentId = ($(this).parent().attr('id')); + $('#'+parentId + ' .templateName span').addClass('clickedText') + e.stopPropagation() + }) + $(document).on("click", function(e) { + if ($(e.target).is(".templateIcon, .templateName span") === false) { + $('.template .templateIcon').removeClass('clicked'); + $('.template .templateName span').removeClass('clickedText'); + } + }); +})
\ No newline at end of file |
