1/*! * jQuery Cookie Plugin v1.4.1 2 * https://github.com/carhartl/jquery-cookie 3 */ 4 5!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof exports?a(require("jquery")):a(jQuery)}(function(a){function c(a){return h.raw?a:encodeURIComponent(a)}function d(a){return h.raw?a:decodeURIComponent(a)}function e(a){return c(h.json?JSON.stringify(a):String(a))}function f(a){0===a.indexOf('"')&&(a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return a=decodeURIComponent(a.replace(b," ")),h.json?JSON.parse(a):a}catch(c){}}function g(b,c){var d=h.raw?b:f(b);return a.isFunction(c)?c(d):d}var b=/\+/g,h=a.cookie=function(b,f,i){if(arguments.length>1&&!a.isFunction(f)){if(i=a.extend({},h.defaults,i),"number"==typeof i.expires){var j=i.expires,k=i.expires=new Date;k.setTime(+k+864e5*j)}return document.cookie=[c(b),"=",e(f),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}for(var l=b?void 0:{},m=document.cookie?document.cookie.split("; "):[],n=0,o=m.length;o>n;n++){var p=m[n].split("="),q=d(p.shift()),r=p.join("=");if(b&&b===q){l=g(r,f);break}b||void 0===(r=g(r))||(l[q]=r)}return l};h.defaults={},a.removeCookie=function(b,c){return void 0===a.cookie(b)?!1:(a.cookie(b,"",a.extend({},c,{expires:-1})),!a.cookie(b))}}); 6 7/* ------------------------------------------------ 8 Project: EARNA - WordPressTheme 9 Author: WordPressRiver 10 11NOTE: This file Change the styling of color, backgrond color of the actual Template. so you can change as your requirement. 12------------------------------------------------ */ 13 14 15 16jQuery(document).ready(function($) { 17 18/*------------------------------------ 19 EARNA Right sidebar 20--------------------------------------*/ 21style_switcher = $('.color-customizer'), 22panelWidth = style_switcher.outerWidth(true); 23$('.color-customizer .opener').on("click", function(){ 24 var $this = $(this); 25 if ($(".color-customizer.closed").length>0) { 26 style_switcher.animate({"right" : "0px"}); 27 $(".color-customizer.closed").removeClass("closed"); 28 $(".color-customizer").addClass("opened"); 29 } else { 30 $(".color-customizer.opened").removeClass("opened"); 31 $(".color-customizer").addClass("closed"); 32 style_switcher.animate({"right" : '-' + panelWidth}); 33 } 34 return false; 35}); 36 37 38/*------------------------------------ 39 EARNA Style change 40--------------------------------------*/ 41var link = $('link[data-style="styles"]'), 42link_no_cookie = $('link[data-style="styles-no-cookie"]'); 43 44 45/*------------------------------------ 46 EARNA Color Changer 47--------------------------------------*/ 48$('.color-customizer .colorChange li').on('click',function(){ 49 if (link.length>0) { 50 var $this = $(this), 51 tp_stylesheet = $this.data('style'); 52 $(".color-customizer .colorChange .selected").removeClass("selected"); 53 $this.addClass("selected"); 54 link.attr('href', 'https://wordpressriverthemes.com/earna/wp-content/themes/earna/css/theme-color/' + tp_stylesheet + '.css'); 55 $.cookie('tp_stylesheet', tp_stylesheet, 30); 56 } 57}); 58 59 60/*------------------------------------ 61 EARNA Reset all customize styles 62--------------------------------------*/ 63$('.color-customizer .reset a.reset-btn').on('click',function() { 64 65 //Logo change 66 $.cookie('tp_stylesheet', 'theme-default', 30); 67 var tp_stylesheet = 'theme-default'; 68 $('.color-customizer .colorChange li.selected').removeClass("selected"); 69 $('.color-customizer .colorChange li[data-style="'+tp_stylesheet+'"]').addClass("selected"); 70 link.attr('href', 'css/theme-color/' + tp_stylesheet + '.css'); 71 if ($("#logo-img").length>0) { 72 document.getElementById("logo-img").src="images/logo-customizer/logo-" + tp_stylesheet + ".png"; 73 }; 74 75 $(window).trigger('resize'); 76 $('.desktopTopFixed').removeClass('desktopTopFixed'); 77 }); 78});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.