Просмотр файла main_files/js/color-switcher.js

Размер файла: 1.03Kb
  1. /*
  2.  
  3. [Color Switcher Script]
  4.  
  5. Project: BizLinks - Material Design Agency and Business Template
  6. Version: 1.1
  7. Author : themelooks.com
  8.  
  9. */
  10.  
  11. (function ($) {
  12. "use strict"; // this function is executed in strict mode
  13. $(document).ready(function () {
  14. $('#open-switcher').on('click', function (){
  15. $('#open-switcher').css("display", "none");
  16. $('#demo-colors').animate({ 'left': '0px' }, 200, 'linear', function(){
  17. $('#close-switcher').fadeIn(200);
  18. });
  19. });
  20.  
  21. $('#close-switcher').on('click', function (){
  22. $('#close-switcher').css("display", "none");
  23. $('#demo-colors').animate({ 'left': '-202px' }, 200, 'linear', function(){
  24. $('#open-switcher').fadeIn(200);
  25. });
  26. });
  27.  
  28. $('#mainColors li').on('click', function () {
  29. $('#mainColorScheme').attr('href', $(this).attr('data-path'));
  30. $(this).addClass('active').siblings().removeClass('active');
  31. });
  32. });
  33. })(jQuery);