1/*----------------------------------------------------------------------------------- 2 /* Styles Switcher 3 -----------------------------------------------------------------------------------*/ 4var path = Drupal.settings.pathToTheme; 5window.console = window.console || (function() { 6 var c = {}; 7 c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile = c.clear = c.exception = c.trace = c.assert = function() { 8 }; 9 return c; 10})(); 11 12 13jQuery(document).ready(function($) { 14 15// Skin 16 $(".sk-w").click(function() { 17 18 jQuery(".w-slider-mask .logo-wrapper ").each(function(index, el) { 19 var url_img = 'url(' + jQuery(this).find('>img').attr('src') + ')'; //lấy ra giá trá» cá»§a thuá»c tÃnh chú ý nha. 20 jQuery(this).removeAttr('style'); 21 jQuery(this).css("background-image", url_img); 22 jQuery(this).find('>img').hide(); 23 }); 24 $("#skin").attr("href", path + "/css/style.css"); 25 $('body').removeClass('dark'); 26 return false; 27 28 }); 29 $(".sk-d").click(function() { 30 31 jQuery(".w-slider-mask .logo-wrapper ").each(function(index, el) { 32 var url_img = 'url(' + jQuery(this).attr('title') + ')'; //lấy ra giá trá» cá»§a thuá»c tÃnh chú ý nha. 33 jQuery(this).removeAttr('style'); 34 jQuery(this).css("background-image", url_img); 35 jQuery(this).find('>img').hide(); 36 }); 37 $("#skin").attr("href", path + "/css/dark.css"); 38 $('body').addClass('dark'); 39 return false; 40 }); 41// note 42 if ($('body').hasClass('dark')) { 43 jQuery(".w-slider-mask .logo-wrapper ").each(function(index, el) { 44 var url_img = 'url(' + jQuery(this).attr('title') + ')'; //lấy ra giá trá» cá»§a thuá»c tÃnh chú ý nha. 45 jQuery(this).removeAttr('style'); 46 jQuery(this).css("background-image", url_img); 47 jQuery(this).find('>img').hide(); 48 }); 49 } else { 50 jQuery(".w-slider-mask .logo-wrapper ").each(function(index, el) { 51 var url_img = 'url(' + jQuery(this).find('>img').attr('src') + ')'; //lấy ra giá trá» cá»§a thuá»c tÃnh chú ý nha. 52 jQuery(this).removeAttr('style'); 53 jQuery(this).css("background-image", url_img); 54 jQuery(this).find('>img').hide(); 55 }); 56 } 57// Color Changer 58 $(".green").click(function() { 59 $("#color").attr("href", path + "/css/colors/green.css"); 60 return false; 61 }); 62 $(".blue-a").click(function() { 63 $("#color").attr("href", path + "/css/colors/blue.css"); 64 return false; 65 }); 66 $(".salmon").click(function() { 67 $("#color").attr("href", path + "/css/colors/salmon.css"); 68 return false; 69 }); 70 $(".gray").click(function() { 71 $("#color").attr("href", path + "/css/colors/gray.css"); 72 return false; 73 }); 74 $(".yellow").click(function() { 75 $("#color").attr("href", path + "/css/colors/yellow.css"); 76 return false; 77 }); 78 $(".red").click(function() { 79 $("#color").attr("href", path + "/css/colors/red.css"); 80 return false; 81 }); 82 $(".olive").click(function() { 83 $("#color").attr("href", path + "/css/colors/olive.css"); 84 return false; 85 }); 86 $(".royal").click(function() { 87 $("#color").attr("href", path + "/css/colors/royal.css"); 88 return false; 89 }); 90 $(".violet").click(function() { 91 $("#color").attr("href", path + "/css/colors/violet.css"); 92 return false; 93 }); 94 $(".turquoise").click(function() { 95 $("#color").attr("href", path + "/css/colors/turquoise.css"); 96 return false; 97 }); 98 $("#style-switcher h2 a").click(function(e) { 99 e.preventDefault(); 100 var div = $("#style-switcher"); 101 console.log(div.css("left"));
102 if (div.css("left") === "-206px") { 103 $("#style-switcher").animate({ 104 left: "0px" 105 }); 106 } else { 107 $("#style-switcher").animate({ 108 left: "-206px" 109 }); 110 } 111 }); 112 // Footer Style Switcher 113 $("#footer-style").change(function(e) { 114 if ($(this).val() == 1) { 115 $("#footer").removeClass("dark"); 116 $("#footer-bottom").removeClass("dark"); 117 } else { 118 $("#footer").addClass("dark"); 119 $("#footer-bottom").addClass("dark"); 120 } 121 }); 122 //Layout Switcher 123 $("#layout-style").change(function(e) { 124 if ($(this).val() == 1) { 125 $("body").removeClass("boxed"), 126 $(window).resize(); 127 stickyheader = !stickyheader; 128 } else { 129 $("body").addClass("boxed"), 130 $(window).resize(); 131 stickyheader = !stickyheader; 132 } 133 }); 134 $("#layout-switcher").on('change', function() { 135 $('#layout').attr('href', $(this).val() + '.css'); 136 }); 137 $(".colors li a").click(function(e) { 138 e.preventDefault(); 139 $(this).parent().parent().find("a").removeClass("active"); 140 $(this).addClass("active"); 141 }); 142 $('.bg li a').click(function() { 143 var current = $('#style-switcher select[id=layout-style]').find('option:selected').val(); 144 if (current == '2') { 145 var bg = $(this).css("backgroundImage"); 146 $("body").css("backgroundImage", bg); 147 } else { 148 alert('Please select boxed layout!'); 149 } 150 }); 151 $("#reset a").click(function(e) { 152 var bg = $(this).css("backgroundImage"); 153 $("body").css("backgroundImage", "url(./images/bg/noise.png)"); 154 $("#navigation").removeClass("style-2") 155 }); 156});
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.