Geen omschrijving
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.js 59KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717
  1. (function ($) {
  2. "use strict";
  3. /*--
  4. Menu Stick
  5. -----------------------------------*/
  6. let width = $(window).width();
  7. const ADD_SUB_NAV_CONTAINER = 'ADD_SUB_NAV_CONTAINER';
  8. const REMOVE_SUB_NAV_CONTAINER = 'REMOVE_SUB_NAV_CONTAINER';
  9. var header = $('.sticky-bar');
  10. var win = $(window);
  11. let ele_page = $("body").hasClass("product_pg");
  12. let win_wid = win.width();
  13. let ram_page = window.location.pathname;
  14. let loc= ram_page.includes('ramproducts.html');
  15. let loc_2= ram_page.includes('allinones.html');
  16. let loc_3= ram_page.includes('laptops.html');
  17. function naChanges(){
  18. if(loc === true){
  19. $("svg").find("path").attr("fill","#000");
  20. }
  21. else if(loc_2 === true || loc_3 === true){
  22. if(window.location.href.includes("?Zeno") || window.location.href.includes("?AIO%20Fyro") || window.location.href.includes("?FYRO") || window.location.href.includes("?AIO%20Zeno")){
  23. if(win_wid <=1199){
  24. $(".user-icon").find('path').attr('fill',"#000");
  25. $(".cart_icon").find('path').attr('fill',"#000");
  26. }else{
  27. $("svg").find("path").attr("fill","#fff");
  28. }
  29. }else{
  30. $("svg").find("path").attr("fill","#000");
  31. }
  32. }
  33. else{
  34. $("body.product_pg").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff");
  35. }
  36. }
  37. setTimeout(naChanges, 1000);
  38. let $body_pg = $("body").hasClass("services_page");
  39. if ($body_pg == true) {
  40. $(".main-menu").find("nav ul li a").addClass("text-dark");
  41. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  42. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  43. $(".header-bottom").addClass("sticky-bar stick");
  44. $("body.services_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#000");
  45. }
  46. function subNavContainer(option){
  47. let urlName = window.location.href;
  48. if(!urlName.toLowerCase().includes('zeno') && !urlName.toLowerCase().includes('fyro')){
  49. return;
  50. }
  51. if(option === ADD_SUB_NAV_CONTAINER){
  52. $('.sub_nav_container').removeClass('d-none');
  53. }else if(option === REMOVE_SUB_NAV_CONTAINER){
  54. $('.sub_nav_container').addClass('d-none');
  55. }
  56. }
  57. win.on('scroll', function() {
  58. var scroll = win.scrollTop();
  59. // const mainContainerIsThere = document.querySelector('.mainContanierProduct').getBoundingClientRect();
  60. // if(mainContainerIsThere.top <200){
  61. // $('.sub_nav_container').removeClass('d-none');
  62. // }else{
  63. // $('.sub_nav_container').addClass('d-none');
  64. // }
  65. if (scroll < 100) {
  66. $('.sub_nav_container').addClass('d-none');
  67. if(window.location.href.includes("?Zeno") || window.location.href.includes("?FYRO") || window.location.href.includes("?AIO%20Fyro") || window.location.href.includes("?AIO%20Zeno")){
  68. header.addClass('stick');
  69. }else{
  70. header.removeClass('stick');
  71. }
  72. $("body.about_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff");
  73. $("body.product_pg").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff");
  74. $("body.services_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff");
  75. header.removeClass('bg-white');
  76. $(".hover_tab_1").find("svg").find("path").attr("fill","#fff");
  77. $(".hover_tab_2").find("svg").find("path").attr("fill","#fff");
  78. $('.header-bottom-flex').find('svg path').attr('fill','#fff');
  79. $(".main-menu").find("nav ul li a").addClass("text-dark");
  80. $("svg").find("path").attr("fill","#000");
  81. // $("body").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff");
  82. $("body.services_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#fff");
  83. if(!$('.iframcontainer').hasClass('d-none')){
  84. subNavContainer(REMOVE_SUB_NAV_CONTAINER);
  85. }
  86. if ($body_pg == true) {
  87. $(".main-menu").find("nav ul li a").addClass("text-dark");
  88. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  89. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  90. $(".header-bottom").addClass("sticky-bar stick");
  91. }else{
  92. let $about_pg = $("body").hasClass("about_page");
  93. if($about_pg == true){
  94. $(".main-menu").find("nav ul li a").addClass("text-dark");
  95. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  96. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  97. $(".header-bottom").addClass("sticky-bar stick");
  98. $("body.about_page").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#000");
  99. }else{
  100. if(loc === true || loc_2 === true || loc_3 === true){
  101. if(window.location.href.includes("?Zeno") || window.location.href.includes("?FYRO") || window.location.href.includes("?AIO%20Fyro") || window.location.href.includes("?AIO%20Zeno")){
  102. if(win_wid <=1199){
  103. $(".user-icon").find('path').attr('fill',"#000");
  104. $(".cart_icon").find('path').attr('fill',"#000");
  105. }else{
  106. let imgs = `/dist/assets/imgs/anwi-logo-2.png`;
  107. $(".logo-menu-wrap").find(".logo img").attr("src",imgs);
  108. // $(".main-menu").find("nav ul li a").addClass("text-white").removeClass("text-dark");
  109. //$('.same-style').find('svg path').attr('fill','#fff');
  110. //$('.header-bottom-flex').find('svg path').attr('fill','#fff');
  111. $(".header-bottom.sticky-bar.stick").removeClass("sticky-bar stick");
  112. }
  113. }
  114. else{
  115. let imgs = `/dist/assets/imgs/anwi-logo-1.png`;
  116. $(".main-menu").find("nav ul li a").addClass("text-dark").removeClass("text-white");
  117. $(".logo-menu-wrap").find(".logo img").attr("src",imgs);
  118. $('.same-style').find('svg path').attr('fill','#000');
  119. $('.header-bottom-flex').find('svg path').attr('fill','#000');
  120. $(".header-bottom.sticky-bar.stick").removeClass("sticky-bar stick");
  121. }
  122. } else{
  123. let contact_pg = $("body").hasClass("contact_page");
  124. if(contact_pg === true){
  125. $(".main-menu").find("nav ul li a").addClass("text-dark");
  126. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  127. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  128. $('.header-bottom-flex').find('svg path').attr('fill','#000');
  129. }else{
  130. let $body_pg = $("body").hasClass("main_pg");
  131. if($body_pg === true){
  132. let img_src = `/dist/assets/imgs/anwi-logo-2.png`;
  133. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  134. $(".main-menu").find("nav ul li a").removeClass("text-dark");
  135. $('.header-bottom-flex').find('svg path').attr('fill','#fff');
  136. $(".header-bottom.sticky-bar.stick").removeClass("sticky-bar stick");
  137. }
  138. else{
  139. let $suport = $("body").hasClass("support_pg");
  140. if($suport === true){
  141. // let img_src = `/dist/assets/imgs/anwi-logo-2.png`;
  142. // $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  143. // $(".main-menu").find("nav ul li a").removeClass("text-dark");
  144. // $('.header-bottom-flex').find('svg path').attr('fill','#fff');
  145. $(".main-menu").find("nav ul li a").addClass("text-dark");
  146. let img_src = `./dist/assets/imgs/anwi-logo-1.png`;
  147. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  148. $('.same-style').find('svg path').attr('fill','#000');
  149. }
  150. $(".main-menu").find("nav ul li a").removeClass("text-white");
  151. }
  152. }
  153. }
  154. }
  155. }
  156. } else {
  157. header.addClass('stick');
  158. subNavContainer(ADD_SUB_NAV_CONTAINER);
  159. $(".header-bottom").addClass("sticky-bar stick");
  160. let src = `/dist/assets/imgs/anwi-logo-1.png`;
  161. $(".logo-menu-wrap").find(".logo a img").attr("src",src);
  162. $(".main-menu").find("nav ul li a").removeClass("text-white");
  163. $("body.product_pg").find(".header-large-device").find(".header-action-wrap").find(".same-style").find("svg").find("path").attr("fill","#000");
  164. $('.header-bottom-flex').find('svg path').attr('fill','#000')
  165. let $body_pg = $("body").hasClass("services_page");
  166. if ($body_pg == true) {
  167. let src = `/dist/assets/imgs/anwi-logo-1.png`;
  168. $(".logo-menu-wrap").find(".logo a img").attr("src",src);
  169. $(".main-menu").find("nav ul li a").removeClass("text-white");
  170. }
  171. let $about_pg = $("body").hasClass("about_page");
  172. if($about_pg == true){
  173. $(".main-menu").find("nav ul li a").addClass("text-dark");
  174. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  175. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  176. $(".header-bottom").addClass("sticky-bar stick");
  177. }
  178. }
  179. });
  180. $("nav ul li").each(function(){
  181. let nav_item = $(this).find("ul").hasClass("pb-3");
  182. if(window.location.href.includes("?Zeno") || window.location.href.includes("?FYRO") || window.location.href.includes("?AIO%20Fyro") || window.location.href.includes("?AIO%20Zeno")){
  183. $(".header-bottom").addClass("bg-white");
  184. $(".header-bottom").addClass("stick");
  185. }
  186. else{
  187. $(".header-bottom").removeClass("bg-white");
  188. }
  189. if(nav_item === true){
  190. $(this).on("mouseenter",function(){
  191. $(".sub_nav_container").addClass("d-none");
  192. let nav_cls = $(".header-bottom").hasClass("stick");
  193. if(nav_cls === false){
  194. $(".header-bottom").addClass("bg-white");
  195. let src = `/dist/assets/imgs/anwi-logo-1.png`;
  196. $(".logo-menu-wrap").find(".logo a img").attr("src",src);
  197. $(".main-menu").find("nav ul li a").addClass("text-dark").removeClass("text-white");
  198. $('.header-bottom-flex').find('svg path').attr('fill','#000');
  199. }
  200. });
  201. $(this).on("mouseleave",function(){
  202. let nav_cls = $(".header-bottom").hasClass("stick");
  203. let product_detail = window.location.pathname;
  204. let detail = product_detail.includes("productdetails.html");
  205. if(detail === true){
  206. $(".sub_nav_container").removeClass("d-none");
  207. }
  208. if(nav_cls === false){
  209. let ram_page = window.location.pathname;
  210. let loc= ram_page.includes('ramproducts.html');
  211. if(loc === false){
  212. let contact_pg = $("body").hasClass("contact_page");
  213. let product_pg = $("body").hasClass("product_pg");
  214. if(contact_pg === true){
  215. $(".header-bottom").removeClass("bg-white");
  216. $(".main-menu").find("nav ul li a").addClass("text-dark").removeClass("text-white");
  217. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  218. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  219. }else if(product_pg === true){
  220. $(".header-bottom").removeClass("bg-white");
  221. $(".main-menu").find("nav ul li a").addClass("text-dark").removeClass("text-white");
  222. let img_src = `/dist/assets/imgs/anwi-logo-1.png`;
  223. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  224. $('.header-bottom-flex').find('svg path').attr('fill','#000');
  225. }else{
  226. let $body_pg = $("body").hasClass("main_pg");
  227. if($body_pg === true ){
  228. let src = `/dist/assets/imgs/anwi-logo-2.png`;
  229. $(".logo-menu-wrap").find(".logo a img").attr("src",src);
  230. header.removeClass('bg-white');
  231. $('.header-bottom-flex').find('svg path').attr('fill','#fff');
  232. $(".main-menu").find("nav ul li a").addClass("text-white").removeClass("text-dark");
  233. }
  234. else{
  235. let $body_nav = $("body").attr("class");
  236. if($body_nav === "support_pg" || $body_nav === "media_page" || $body_nav === "meter_pg"){
  237. $(".header-bottom").removeClass('bg-white');
  238. $(".main-menu").find("nav ul li a").addClass("text-dark");
  239. let img_src = `./dist/assets/imgs/anwi-logo-1.png`;
  240. $(".logo-menu-wrap").find(".logo a img").attr("src",img_src);
  241. $('.header-bottom-flex nav').find('path').attr('fill','#000');
  242. }else{
  243. $(".header-bottom").addClass("bg-white");
  244. }
  245. }
  246. // let src = `/dist/assets/imgs/anwi-logo-2.png`;
  247. // $(".logo-menu-wrap").find(".logo a img").attr("src",src);
  248. // $(".main-menu").find("nav ul li a").addClass("text-white").removeClass("text-dark");
  249. // $('.header-bottom-flex').find('svg path').attr('fill','#fff');
  250. }
  251. }else{
  252. if (scroll < 100) {
  253. header.removeClass('bg-white');
  254. }
  255. else{
  256. $(".header-bottom").addClass("bg-white");
  257. }
  258. $(".sticky-bar").addClass("stick");
  259. $(".satoshi_font").removeClass("text-white");
  260. }
  261. }
  262. })
  263. }
  264. })
  265. /*--------------------------------
  266. Slider active 1
  267. -----------------------------------*/
  268. sliders();
  269. function sliders(){
  270. if(window.location.href.includes('login')) return;
  271. $('.slider-active-1').slick({
  272. slidesToShow: 1,
  273. slidesToScroll: 1,
  274. fade: true,
  275. loop: true,
  276. dots: false,
  277. arrows: true,
  278. prevArrow: '<span class="slider-icon slider-icon-prev"><i class="icofont-simple-left"></i></span>',
  279. nextArrow: '<span class="slider-icon slider-icon-next"><i class="icofont-simple-right"></i></span>',
  280. responsive: [{
  281. breakpoint: 1500,
  282. settings: {
  283. slidesToShow: 1,
  284. slidesToScroll: 1,
  285. }
  286. },
  287. {
  288. breakpoint: 1199,
  289. settings: {
  290. slidesToShow: 1,
  291. slidesToScroll: 1,
  292. }
  293. },
  294. {
  295. breakpoint: 991,
  296. settings: {
  297. slidesToShow: 1,
  298. slidesToScroll: 1,
  299. }
  300. },
  301. {
  302. breakpoint: 767,
  303. settings: {
  304. autoplay: false,
  305. slidesToShow: 1,
  306. slidesToScroll: 1,
  307. }
  308. }
  309. ]
  310. });
  311. /*--------------------------------
  312. Slider active 2
  313. -----------------------------------*/
  314. $('.slider-active-2').slick({
  315. slidesToShow: 1,
  316. slidesToScroll: 1,
  317. fade: true,
  318. loop: true,
  319. dots: true,
  320. arrows: false,
  321. prevArrow: '<span class="slider-icon slider-icon-prev"><i class="icofont-simple-left"></i></span>',
  322. nextArrow: '<span class="slider-icon slider-icon-next"><i class="icofont-simple-right"></i></span>',
  323. responsive: [{
  324. breakpoint: 1500,
  325. settings: {
  326. slidesToShow: 1,
  327. slidesToScroll: 1,
  328. }
  329. },
  330. {
  331. breakpoint: 1199,
  332. settings: {
  333. slidesToShow: 1,
  334. slidesToScroll: 1,
  335. }
  336. },
  337. {
  338. breakpoint: 991,
  339. settings: {
  340. slidesToShow: 1,
  341. slidesToScroll: 1,
  342. }
  343. },
  344. {
  345. breakpoint: 767,
  346. settings: {
  347. autoplay: false,
  348. slidesToShow: 1,
  349. slidesToScroll: 1,
  350. }
  351. }
  352. ]
  353. });
  354. /*--
  355. Slider active 3
  356. -----------------------------------*/
  357. $('.slider-active-3').slick({
  358. arrows: false,
  359. infinite: true,
  360. slidesToShow: 1,
  361. dots: true,
  362. fade: true,
  363. autoplay: false,
  364. autoplaySpeed: 5000,
  365. customPaging : function(slider, i) {
  366. var thumb = $(slider.$slides[i]).data('thumb');
  367. return '<button class="overlay"><img src="'+thumb+'"></button>';
  368. },
  369. responsive: [
  370. {
  371. breakpoint: 767,
  372. settings: {
  373. dots: true,
  374. autoplay: false,
  375. autoplaySpeed: 5000,
  376. }
  377. }
  378. ]
  379. });
  380. /*--------------------------------
  381. slider active 4
  382. -----------------------------------*/
  383. $('.slider-active-4').slick({
  384. slidesToShow: 1,
  385. slidesToScroll: 1,
  386. fade: true,
  387. loop: true,
  388. dots: true,
  389. arrows: false,
  390. prevArrow: '<span class="slider-icon slider-icon-prev"><i class="icofont-simple-left"></i></span>',
  391. nextArrow: '<span class="slider-icon slider-icon-next"><i class="icofont-simple-right"></i></span>',
  392. responsive: [{
  393. breakpoint: 1500,
  394. settings: {
  395. slidesToShow: 1,
  396. slidesToScroll: 1,
  397. }
  398. },
  399. {
  400. breakpoint: 1199,
  401. settings: {
  402. slidesToShow: 1,
  403. slidesToScroll: 1,
  404. }
  405. },
  406. {
  407. breakpoint: 991,
  408. settings: {
  409. slidesToShow: 1,
  410. slidesToScroll: 1,
  411. }
  412. },
  413. {
  414. breakpoint: 767,
  415. settings: {
  416. autoplay: false,
  417. slidesToShow: 1,
  418. slidesToScroll: 1,
  419. }
  420. }
  421. ]
  422. });
  423. /*--------------------------------
  424. Slider active 5
  425. -----------------------------------*/
  426. $('.slider-active-5').slick({
  427. slidesToShow: 1,
  428. slidesToScroll: 1,
  429. fade: true,
  430. loop: true,
  431. dots: true,
  432. arrows: false,
  433. prevArrow: '<span class="slider-icon slider-icon-prev"><i class="icofont-simple-left"></i></span>',
  434. nextArrow: '<span class="slider-icon slider-icon-next"><i class="icofont-simple-right"></i></span>',
  435. });
  436. /*--------------------------------
  437. Product slider active 1
  438. -----------------------------------*/
  439. $('.product-slider-active-1').slick({
  440. slidesToShow: 3,
  441. slidesToScroll: 1,
  442. loop: true,
  443. dots: false,
  444. arrows: false,
  445. responsive: [{
  446. breakpoint: 1500,
  447. settings: {
  448. slidesToShow: 3,
  449. slidesToScroll: 1,
  450. }
  451. },
  452. {
  453. breakpoint: 1199,
  454. settings: {
  455. slidesToShow: 3,
  456. slidesToScroll: 1,
  457. }
  458. },
  459. {
  460. breakpoint: 991,
  461. settings: {
  462. slidesToShow: 2,
  463. slidesToScroll: 1,
  464. }
  465. },
  466. {
  467. breakpoint: 767,
  468. settings: {
  469. autoplay: false,
  470. slidesToShow: 2,
  471. slidesToScroll: 1,
  472. }
  473. },
  474. {
  475. breakpoint: 575,
  476. settings: {
  477. autoplay: false,
  478. slidesToShow: 1,
  479. slidesToScroll: 1,
  480. }
  481. }
  482. ]
  483. });
  484. /*--------------------------------
  485. Product slider active 2
  486. -----------------------------------*/
  487. $('.product-slider-active-2').slick({
  488. slidesToShow: 6,
  489. slidesToScroll: 1,
  490. loop: true,
  491. dots: false,
  492. arrows: false,
  493. responsive: [{
  494. breakpoint: 1500,
  495. settings: {
  496. slidesToShow: 6,
  497. slidesToScroll: 1,
  498. }
  499. },
  500. {
  501. breakpoint: 1199,
  502. settings: {
  503. slidesToShow: 4,
  504. slidesToScroll: 1,
  505. }
  506. },
  507. {
  508. breakpoint: 991,
  509. settings: {
  510. slidesToShow: 3,
  511. slidesToScroll: 1,
  512. }
  513. },
  514. {
  515. breakpoint: 767,
  516. settings: {
  517. autoplay: false,
  518. slidesToShow: 2,
  519. slidesToScroll: 1,
  520. }
  521. },
  522. {
  523. breakpoint: 575,
  524. settings: {
  525. autoplay: false,
  526. slidesToShow: 1,
  527. slidesToScroll: 1,
  528. }
  529. }
  530. ]
  531. });
  532. /*--------------------------------
  533. Product slider active 3
  534. -----------------------------------*/
  535. $('.product-slider-active-3').slick({
  536. slidesToShow: 2,
  537. slidesToScroll: 1,
  538. loop: true,
  539. dots: false,
  540. arrows: false,
  541. responsive: [{
  542. breakpoint: 1500,
  543. settings: {
  544. slidesToShow: 2,
  545. slidesToScroll: 1,
  546. }
  547. },
  548. {
  549. breakpoint: 1199,
  550. settings: {
  551. slidesToShow: 1,
  552. slidesToScroll: 1,
  553. }
  554. },
  555. {
  556. breakpoint: 991,
  557. settings: {
  558. slidesToShow: 1,
  559. slidesToScroll: 1,
  560. }
  561. },
  562. {
  563. breakpoint: 767,
  564. settings: {
  565. autoplay: false,
  566. slidesToShow: 1,
  567. slidesToScroll: 1,
  568. }
  569. },
  570. {
  571. breakpoint: 575,
  572. settings: {
  573. autoplay: false,
  574. slidesToShow: 1,
  575. slidesToScroll: 1,
  576. }
  577. }
  578. ]
  579. });
  580. /*--------------------------------
  581. Product slider active 4
  582. -----------------------------------*/
  583. $('.product-slider-active-4').slick({
  584. slidesToShow: 4,
  585. slidesToScroll: 1,
  586. loop: true,
  587. dots: false,
  588. arrows: false,
  589. responsive: [{
  590. breakpoint: 1500,
  591. settings: {
  592. slidesToShow: 4,
  593. slidesToScroll: 1,
  594. }
  595. },
  596. {
  597. breakpoint: 1199,
  598. settings: {
  599. slidesToShow: 3,
  600. slidesToScroll: 1,
  601. }
  602. },
  603. {
  604. breakpoint: 991,
  605. settings: {
  606. slidesToShow: 2,
  607. slidesToScroll: 1,
  608. }
  609. },
  610. {
  611. breakpoint: 767,
  612. settings: {
  613. autoplay: false,
  614. slidesToShow: 2,
  615. slidesToScroll: 1,
  616. }
  617. },
  618. {
  619. breakpoint: 575,
  620. settings: {
  621. autoplay: false,
  622. slidesToShow: 1,
  623. slidesToScroll: 1,
  624. }
  625. }
  626. ]
  627. });
  628. /*--------------------------------
  629. Brand logo active
  630. -----------------------------------*/
  631. $('.brand-logo-active , .brand-logo-active-2').slick({
  632. slidesToShow: 6,
  633. slidesToScroll: 1,
  634. loop: true,
  635. dots: false,
  636. arrows: false,
  637. responsive: [{
  638. breakpoint: 1500,
  639. settings: {
  640. slidesToShow: 6,
  641. slidesToScroll: 1,
  642. }
  643. },
  644. {
  645. breakpoint: 1199,
  646. settings: {
  647. slidesToShow: 5,
  648. slidesToScroll: 1,
  649. }
  650. },
  651. {
  652. breakpoint: 991,
  653. settings: {
  654. slidesToShow: 4,
  655. slidesToScroll: 1,
  656. }
  657. },
  658. {
  659. breakpoint: 767,
  660. settings: {
  661. autoplay: false,
  662. slidesToShow: 3,
  663. slidesToScroll: 1,
  664. }
  665. },
  666. {
  667. breakpoint: 575,
  668. settings: {
  669. autoplay: false,
  670. slidesToShow: 2,
  671. slidesToScroll: 1,
  672. }
  673. }
  674. ]
  675. });
  676. /*--------------------------------
  677. Brand logo active 3
  678. -----------------------------------*/
  679. $('.brand-logo-active-3').slick({
  680. slidesToShow: 6,
  681. slidesToScroll: 1,
  682. loop: true,
  683. dots: true,
  684. arrows: false,
  685. responsive: [{
  686. breakpoint: 1500,
  687. settings: {
  688. slidesToShow: 6,
  689. slidesToScroll: 1,
  690. }
  691. },
  692. {
  693. breakpoint: 1199,
  694. settings: {
  695. slidesToShow: 5,
  696. slidesToScroll: 1,
  697. }
  698. },
  699. {
  700. breakpoint: 991,
  701. settings: {
  702. slidesToShow: 4,
  703. slidesToScroll: 1,
  704. }
  705. },
  706. {
  707. breakpoint: 767,
  708. settings: {
  709. autoplay: false,
  710. slidesToShow: 3,
  711. slidesToScroll: 1,
  712. }
  713. },
  714. {
  715. breakpoint: 575,
  716. settings: {
  717. autoplay: false,
  718. slidesToShow: 2,
  719. slidesToScroll: 1,
  720. }
  721. }
  722. ]
  723. });
  724. }
  725. /*---------------------
  726. Countdown 1
  727. --------------------- */
  728. $('.timer-1 [data-countdown]').each(function() {
  729. var $this = $(this),
  730. finalDate = $(this).data('countdown');
  731. $this.countdown(finalDate, function(event) {
  732. $this.html(event.strftime('<span class="cdown day"> <span>%-D </span><p>Days</p></span> <span class="cdown hour"> <span> %-H</span> <p>Hours</p></span> <span class="cdown minutes"><span>%M</span> <p>Minutes</p> </span>'));
  733. });
  734. });
  735. $('.timer-2 [data-countdown]').each(function() {
  736. var $this = $(this),
  737. finalDate = $(this).data('countdown');
  738. $this.countdown(finalDate, function(event) {
  739. $this.html(event.strftime('<span class="cdown day"> <span>%-D </span><p>Day</p></span> <span class="cdown hour"> <span> %-H</span> <p>Hour</p></span> <span class="cdown minutes"><span>%M</span> <p>Minute</p> </span> <span class="cdown second"><span>%S</span> <p>Second</p> </span>'));
  740. });
  741. });
  742. $('.timer-3 [data-countdown]').each(function() {
  743. var $this = $(this),
  744. finalDate = $(this).data('countdown');
  745. $this.countdown(finalDate, function(event) {
  746. $this.html(event.strftime('<span class="cdown hour"> <span> %-H</span> <p>Hour</p></span> <span class="cdown minutes"><span>%M</span> <p>Minute</p> </span> <span class="cdown second"><span>%S</span> <p>Second</p> </span>'));
  747. });
  748. });
  749. /*---------------------
  750. svg img color
  751. --------------------- */
  752. // Elements to inject
  753. var mySVGsToInject = document.querySelectorAll('img.inject-me');
  754. // Do the injection
  755. SVGInjector(mySVGsToInject);
  756. /*------ Wow Active ----*/
  757. new WOW().init();
  758. /*------------
  759. ScrollUp
  760. ------------------ */
  761. // $.scrollUp({
  762. // scrollText: '<i class="icofont-arrow-up"></i>',
  763. // easingType: 'linear',
  764. // scrollSpeed: 900,
  765. // animation: 'fade'
  766. // });
  767. /*----------------------------
  768. Cart Plus Minus Button
  769. ------------------------------ */
  770. var CartPlusMinus = $('.cart-plus-minus');
  771. CartPlusMinus.prepend('<div class="dec qtybutton">-</div>');
  772. CartPlusMinus.append('<div class="inc qtybutton">+</div>');
  773. $(".qtybutton").on("click", function() {
  774. var $button = $(this);
  775. var oldValue = $button.parent().find("input").val();
  776. if ($button.text() === "+") {
  777. var newVal = parseFloat(oldValue) + 1;
  778. } else {
  779. // Don't allow decrementing below zero
  780. if (oldValue > 0) {
  781. var newVal = parseFloat(oldValue) - 1;
  782. } else {
  783. newVal = 1;
  784. }
  785. }
  786. $button.parent().find("input").val(newVal);
  787. });
  788. /*------- Color active -----*/
  789. $('.pro-details-color-content').on('click', 'a', function(e){
  790. e.preventDefault();
  791. $(this).addClass('active').parent().siblings().children('a').removeClass('active');
  792. });
  793. /*--------------------------------
  794. Cart active
  795. -----------------------------------*/
  796. if ($('.pro-details-action').length) {
  797. var $body = $('body'),
  798. $cartWrap = $('.pro-details-action'),
  799. $cartContent = $cartWrap.find('.product-dec-social');
  800. $cartWrap.on('click', '.social', function(e) {
  801. e.preventDefault();
  802. var $this = $(this);
  803. if (!$this.parent().hasClass('show')) {
  804. $this.siblings('.product-dec-social').addClass('show').parent().addClass('show');
  805. } else {
  806. $this.siblings('.product-dec-social').removeClass('show').parent().removeClass('show');
  807. }
  808. });
  809. /*Close When Click Outside*/
  810. $body.on('click', function(e) {
  811. var $target = e.target;
  812. if (!$($target).is('.pro-details-action') && !$($target).parents().is('.pro-details-action') && $cartWrap.hasClass('show')) {
  813. $cartWrap.removeClass('show');
  814. $cartContent.removeClass('show');
  815. }
  816. });
  817. }
  818. /* Language-dropdown */
  819. $(".language-dropdown-active").on("click", function(e) {
  820. e.preventDefault();
  821. $(this).parent().find('.language-dropdown').slideToggle('medium');
  822. })
  823. /* NiceSelect */
  824. $('.nice-select').niceSelect();
  825. /*--------------------------------
  826. Testimonial active
  827. -----------------------------------*/
  828. $('.testimonial-active , .testimonial-active-2').slick({
  829. slidesToShow: 1,
  830. slidesToScroll: 1,
  831. loop: true,
  832. dots: false,
  833. arrows: false,
  834. responsive: [{
  835. breakpoint: 1500,
  836. settings: {
  837. slidesToShow: 1,
  838. slidesToScroll: 1,
  839. }
  840. },
  841. {
  842. breakpoint: 1199,
  843. settings: {
  844. slidesToShow: 1,
  845. slidesToScroll: 1,
  846. }
  847. },
  848. {
  849. breakpoint: 991,
  850. settings: {
  851. slidesToShow: 1,
  852. slidesToScroll: 1,
  853. }
  854. },
  855. {
  856. breakpoint: 767,
  857. settings: {
  858. autoplay: false,
  859. slidesToShow: 1,
  860. slidesToScroll: 1,
  861. }
  862. },
  863. {
  864. breakpoint: 575,
  865. settings: {
  866. autoplay: false,
  867. slidesToShow: 1,
  868. slidesToScroll: 1,
  869. }
  870. }
  871. ]
  872. });
  873. /*====== SidebarCart ======*/
  874. function miniCart() {
  875. var navbarTrigger = $('.cart-active'),
  876. endTrigger = $('.cart-close'),
  877. container = $('.sidebar-cart-active'),
  878. wrapper2 = $('.main-wrapper');
  879. wrapper2.prepend('<div class="body-overlay"></div>');
  880. navbarTrigger.on('click', function(e) {
  881. e.preventDefault();
  882. container.addClass('inside');
  883. wrapper2.addClass('overlay-active');
  884. });
  885. endTrigger.on('click', function() {
  886. container.removeClass('inside');
  887. wrapper2.removeClass('overlay-active');
  888. });
  889. $('.body-overlay').on('click', function() {
  890. container.removeClass('inside');
  891. wrapper2.removeClass('overlay-active');
  892. });
  893. };
  894. miniCart();
  895. /*-------------------------------
  896. Header Search Toggle
  897. -----------------------------------*/
  898. var searchToggle = $('.search-toggle');
  899. searchToggle.on('click', function(e){
  900. e.preventDefault();
  901. if($(this).hasClass('open')){
  902. $(this).removeClass('open');
  903. $(this).siblings('.search-wrap-3').removeClass('open');
  904. }else{
  905. $(this).addClass('open');
  906. $(this).siblings('.search-wrap-3').addClass('open');
  907. }
  908. })
  909. /*====== Sidebar Active ======*/
  910. function sidebarActive() {
  911. var navbarTrigger = $('.sidebar-active'),
  912. endTrigger = $('.sidebar-close'),
  913. container = $('.clickalbe-sidebar-wrapper-active'),
  914. wrapper3 = $('.main-wrapper-2');
  915. wrapper3.prepend('<div class="body-overlay-2"></div>');
  916. navbarTrigger.on('click', function(e) {
  917. e.preventDefault();
  918. container.addClass('sidebar-visible');
  919. wrapper3.addClass('overlay-active-2');
  920. });
  921. endTrigger.on('click', function() {
  922. container.removeClass('sidebar-visible');
  923. wrapper3.removeClass('overlay-active-2');
  924. });
  925. $('.body-overlay-2').on('click', function() {
  926. container.removeClass('sidebar-visible');
  927. wrapper3.removeClass('overlay-active-2');
  928. });
  929. };
  930. sidebarActive();
  931. /*====== clickable Main Menu active ======*/
  932. var $clickableMainMenu = $('.clickable-mainmenu-wrap'),
  933. $clickableSubMenu = $clickableMainMenu.find('.sub-menu-2');
  934. /*Add Toggle Button in Off Canvas Sub Menu*/
  935. $clickableSubMenu.siblings('a').append('<span class="menu-expand"><i class="fa-solid fa-plus"></i></span>');
  936. /*Close Off Canvas Sub Menu*/
  937. $clickableSubMenu.slideUp();
  938. /*Category Sub Menu Toggle*/
  939. $clickableMainMenu.on('click', 'li a, li .menu-expand', function(e) {
  940. var $this = $(this);
  941. if ($this.parent('li').hasClass('has-sub-menu') || ($this.attr('href') === '#' || $this.hasClass('menu-expand'))) {
  942. e.preventDefault();
  943. if ($this.siblings('ul:visible').length) {
  944. $this.parent('li').removeClass('active').children('ul').slideUp().siblings('a').find('.menu-expand svg').removeClass('fa-minus').addClass('fa-plus');
  945. $this.parent('li').siblings('li').removeClass('active').find('ul:visible').slideUp().siblings('a').find('.menu-expand isvg').removeClass('fa-minus').addClass(' fa-plus ');
  946. } else {
  947. $this.parent('li').addClass('active').children('ul').slideDown().siblings('a').find('.menu-expand svg').removeClass(' fa-plus ').addClass('fa-minus');
  948. $this.parent('li').siblings('li').removeClass('active').find('ul:visible').slideUp().siblings('a').find('.menu-expand svg').removeClass('fa-minus').addClass(' fa-plus ');
  949. }
  950. }
  951. });
  952. /*====== Sidebar menu Active ======*/
  953. function mobileMenuActive() {
  954. var navbarTrigger = $('.mobile-menu-button-active'),
  955. endTrigger = $('.sidebar-close'),
  956. container = $('.mobile-menu-active'),
  957. wrapper4 = $('.main-wrapper-3');
  958. wrapper4.prepend('<div class="body-overlay-3"></div>');
  959. navbarTrigger.on('click', function(e) {
  960. e.preventDefault();
  961. container.addClass('sidebar-visible');
  962. wrapper4.addClass('overlay-active-3');
  963. });
  964. endTrigger.on('click', function() {
  965. container.removeClass('sidebar-visible');
  966. wrapper4.removeClass('overlay-active-3');
  967. });
  968. $('.body-overlay-3').on('click', function() {
  969. container.removeClass('sidebar-visible');
  970. wrapper4.removeClass('overlay-active-3');
  971. });
  972. };
  973. mobileMenuActive();
  974. /*--- Language currency active ----*/
  975. $('.mobile-language-active').on('click', function(e) {
  976. e.preventDefault();
  977. $('.lang-dropdown-active').slideToggle(900);
  978. });
  979. /*------------------------------------
  980. Testimonial img slider active
  981. -----------------------------------*/
  982. $('.testimonial-img-slider-active').slick({
  983. slidesToShow: 1,
  984. slidesToScroll: 1,
  985. arrows: false,
  986. draggable: false,
  987. fade: false,
  988. asNavFor: '.testimonial-active-3',
  989. });
  990. /*--------------------------------
  991. Testimonial active 3
  992. -----------------------------------*/
  993. $('.testimonial-active-3').slick({
  994. slidesToShow: 1,
  995. slidesToScroll: 1,
  996. asNavFor: '.testimonial-img-slider-active , .testimonial-img-slider-active-3',
  997. dots: true,
  998. focusOnSelect: true,
  999. fade: true,
  1000. arrows: false
  1001. });
  1002. /*----------------------------------------------------------
  1003. Testimonial img slider active 3 ( home mega fashion )
  1004. --------------------------------------------------------------*/
  1005. $('.testimonial-img-slider-active-3').on('init afterChange',function(){
  1006. const titleImg = document.querySelector('.testimonial-next-img img');
  1007. const activeSlide = document.querySelector('.testimonial-img-slider.slick-current');
  1008. titleImg.src = activeSlide.nextSibling.querySelector('img').src;
  1009. });
  1010. $('.testimonial-img-slider-active-3').slick({
  1011. slidesToShow: 1,
  1012. slidesToScroll: 1,
  1013. arrows: false,
  1014. draggable: false,
  1015. fade: false,
  1016. asNavFor: '.testimonial-active-3'
  1017. });
  1018. // Isotope active
  1019. // $('.grid').imagesLoaded(function() {
  1020. // // init Isotope
  1021. // var $grid = $('.grid').isotope({
  1022. // itemSelector: '.grid-item',
  1023. // percentPosition: true,
  1024. // layoutMode: 'masonry',
  1025. // masonry: {
  1026. // // use outer width of grid-sizer for columnWidth
  1027. // columnWidth: '.grid-item',
  1028. // }
  1029. // });
  1030. // });
  1031. /*--------------------------
  1032. Isotope active
  1033. ---------------------------- */
  1034. // $('.grid-2').imagesLoaded(function() {
  1035. // // init Isotope
  1036. // $('.grid-2').isotope({
  1037. // itemSelector: '.grid-item-2',
  1038. // percentPosition: true,
  1039. // layoutMode: 'masonry',
  1040. // masonry: {
  1041. // // use outer width of grid-sizer for columnWidth
  1042. // columnWidth: '.grid-sizer',
  1043. // }
  1044. // });
  1045. // });
  1046. /*--------------------------
  1047. Isotope active
  1048. ---------------------------- */
  1049. // $('.grid-3').imagesLoaded(function() {
  1050. // // init Isotope
  1051. // $('.grid-3').isotope({
  1052. // itemSelector: '.grid-item-3',
  1053. // percentPosition: true,
  1054. // layoutMode: 'masonry',
  1055. // masonry: {
  1056. // // use outer width of grid-sizer for columnWidth
  1057. // columnWidth: 1,
  1058. // }
  1059. // });
  1060. // });
  1061. /*------------------------------------
  1062. testimonial img slider active 2
  1063. --------------------------------------*/
  1064. $('.testimonial-img-slider-active-2').slick({
  1065. slidesToShow: 5,
  1066. slidesToScroll: 1,
  1067. arrows: false,
  1068. dots: false,
  1069. focusOnSelect: true,
  1070. draggable: false,
  1071. fade: false,
  1072. asNavFor: '.testimonial-active-4',
  1073. responsive: [
  1074. {
  1075. breakpoint: 1199,
  1076. settings: {
  1077. slidesToShow: 4,
  1078. }
  1079. },
  1080. {
  1081. breakpoint: 991,
  1082. settings: {
  1083. slidesToShow: 5,
  1084. }
  1085. },
  1086. {
  1087. breakpoint: 767,
  1088. settings: {
  1089. slidesToShow: 3,
  1090. }
  1091. },
  1092. {
  1093. breakpoint: 575,
  1094. settings: {
  1095. slidesToShow: 2,
  1096. }
  1097. }
  1098. ]
  1099. });
  1100. /*--------------------------------
  1101. Testimonial active 4
  1102. -----------------------------------*/
  1103. $('.testimonial-active-4').slick({
  1104. slidesToShow: 1,
  1105. slidesToScroll: 1,
  1106. asNavFor: '.testimonial-img-slider-active-2',
  1107. dots: false,
  1108. focusOnSelect: true,
  1109. fade: true,
  1110. arrows: false
  1111. });
  1112. /*--------------------------------
  1113. Testimonial active 5
  1114. -----------------------------------*/
  1115. $('.testimonial-active-5').slick({
  1116. slidesToShow: 1,
  1117. slidesToScroll: 1,
  1118. dots: false,
  1119. fade: false,
  1120. arrows: false,
  1121. responsive: [{
  1122. breakpoint: 1500,
  1123. settings: {
  1124. slidesToShow: 1,
  1125. slidesToScroll: 1,
  1126. }
  1127. },
  1128. {
  1129. breakpoint: 1199,
  1130. settings: {
  1131. slidesToShow: 1,
  1132. slidesToScroll: 1,
  1133. }
  1134. },
  1135. {
  1136. breakpoint: 991,
  1137. settings: {
  1138. slidesToShow: 1,
  1139. slidesToScroll: 1,
  1140. }
  1141. },
  1142. {
  1143. breakpoint: 767,
  1144. settings: {
  1145. autoplay: true,
  1146. slidesToShow: 1,
  1147. slidesToScroll: 1,
  1148. }
  1149. }
  1150. ]
  1151. });
  1152. /*--------------------------------
  1153. Categori slider active
  1154. -----------------------------------*/
  1155. $('.categori-slider-active').slick({
  1156. slidesToShow: 6,
  1157. slidesToScroll: 1,
  1158. dots: false,
  1159. fade: false,
  1160. arrows: false,
  1161. responsive: [{
  1162. breakpoint: 1500,
  1163. settings: {
  1164. slidesToShow: 6,
  1165. slidesToScroll: 1,
  1166. }
  1167. },
  1168. {
  1169. breakpoint: 1199,
  1170. settings: {
  1171. slidesToShow: 6,
  1172. slidesToScroll: 1,
  1173. }
  1174. },
  1175. {
  1176. breakpoint: 991,
  1177. settings: {
  1178. slidesToShow: 4,
  1179. slidesToScroll: 1,
  1180. }
  1181. },
  1182. {
  1183. breakpoint: 767,
  1184. settings: {
  1185. autoplay: true,
  1186. slidesToShow: 3,
  1187. slidesToScroll: 1,
  1188. }
  1189. },
  1190. {
  1191. breakpoint: 575,
  1192. settings: {
  1193. autoplay: true,
  1194. slidesToShow: 2,
  1195. slidesToScroll: 1,
  1196. }
  1197. }
  1198. ]
  1199. });
  1200. /*--------------------------------
  1201. Testimonial active 6
  1202. -----------------------------------*/
  1203. $('.testimonial-active-6').slick({
  1204. slidesToShow: 2,
  1205. slidesToScroll: 1,
  1206. dots: true,
  1207. fade: false,
  1208. arrows: false,
  1209. responsive: [{
  1210. breakpoint: 1500,
  1211. settings: {
  1212. slidesToShow: 2,
  1213. slidesToScroll: 1,
  1214. }
  1215. },
  1216. {
  1217. breakpoint: 1199,
  1218. settings: {
  1219. slidesToShow: 2,
  1220. slidesToScroll: 1,
  1221. }
  1222. },
  1223. {
  1224. breakpoint: 991,
  1225. settings: {
  1226. slidesToShow: 1,
  1227. slidesToScroll: 1,
  1228. }
  1229. },
  1230. {
  1231. breakpoint: 767,
  1232. settings: {
  1233. autoplay: true,
  1234. slidesToShow: 1,
  1235. slidesToScroll: 1,
  1236. }
  1237. }
  1238. ]
  1239. });
  1240. /*--------------------------------
  1241. Product img slider active
  1242. -----------------------------------*/
  1243. $('.product-img-slider-active').slick({
  1244. slidesToShow: 1,
  1245. slidesToScroll: 1,
  1246. dots: true,
  1247. fade: false,
  1248. arrows: false,
  1249. });
  1250. /*--------------------------------
  1251. Testimonial active 7
  1252. -----------------------------------*/
  1253. $('.testimonial-active-7').slick({
  1254. slidesToShow: 1,
  1255. slidesToScroll: 1,
  1256. dots: false,
  1257. fade: false,
  1258. arrows: false,
  1259. });
  1260. /*--------------------------------
  1261. Product details 3 img slider
  1262. -----------------------------------*/
  1263. $('.product-details-3-img-slider').slick({
  1264. slidesToShow: 1,
  1265. slidesToScroll: 1,
  1266. dots: true,
  1267. loop: true,
  1268. fade: false,
  1269. arrows: false,
  1270. });
  1271. /*--------------------------------
  1272. Product details 3 img slider 2
  1273. -----------------------------------*/
  1274. $('.product-details-3-img-slider-2').slick({
  1275. slidesToShow: 1,
  1276. slidesToScroll: 1,
  1277. dots: true,
  1278. loop: true,
  1279. fade: false,
  1280. arrows: false,
  1281. });
  1282. /*====== SidebarSearch ======*/
  1283. function sidebarSearch() {
  1284. var searchTrigger = $('.search-active'),
  1285. endTriggersearch = $('.megashop-search-close'),
  1286. container = $('.main-search-active');
  1287. searchTrigger.on('click', function(e) {
  1288. e.preventDefault();
  1289. container.addClass('search-visible');
  1290. });
  1291. endTriggersearch.on('click', function() {
  1292. container.removeClass('search-visible');
  1293. });
  1294. };
  1295. sidebarSearch();
  1296. /*---------------------
  1297. Price range
  1298. --------------------- */
  1299. // var sliderrange = $('#slider-range');
  1300. // var amountprice = $('#amount');
  1301. // $(function() {
  1302. // sliderrange.slider({
  1303. // range: true,
  1304. // min: 16,
  1305. // max: 400,
  1306. // values: [0, 300],
  1307. // slide: function(event, ui) {
  1308. // amountprice.val("$" + ui.values[0] + " - $" + ui.values[1]);
  1309. // }
  1310. // });
  1311. // amountprice.val("$" + sliderrange.slider("values", 0) +
  1312. // " - $" + sliderrange.slider("values", 1));
  1313. // });
  1314. /*---------------------
  1315. Video popup
  1316. --------------------- */
  1317. // $('.video-popup').magnificPopup({
  1318. // type: 'iframe',
  1319. // mainClass: 'mfp-fade',
  1320. // removalDelay: 160,
  1321. // preloader: false,
  1322. // zoom: {
  1323. // enabled: true,
  1324. // }
  1325. // });
  1326. /*-------------------------------------
  1327. checkout one click toggle function
  1328. ---------------------------------------*/
  1329. var checked = $( '.sin-payment input:checked' )
  1330. if(checked){
  1331. $(checked).siblings( '.payment-box' ).slideDown(900);
  1332. };
  1333. $( '.sin-payment input' ).on('change', function() {
  1334. $( '.payment-box' ).slideUp(900);
  1335. $(this).siblings( '.payment-box' ).slideToggle(900);
  1336. });
  1337. /*-----------------------
  1338. Shop filter active
  1339. ------------------------- */
  1340. $('.shop-filter-active').on('click', function(e) {
  1341. e.preventDefault();
  1342. $('.product-filter-wrapper').slideToggle();
  1343. })
  1344. var shopFiltericon = $('.shop-filter-active');
  1345. shopFiltericon.on('click', function() {
  1346. $('.shop-filter-active').toggleClass('active');
  1347. })
  1348. /*--
  1349. Product details slider 2
  1350. -----------------------------------*/
  1351. $('.pro-dec-big-img-slider-2').slick({
  1352. slidesToShow: 1,
  1353. slidesToScroll: 1,
  1354. arrows: false,
  1355. draggable: false,
  1356. fade: false,
  1357. asNavFor: '.product-dec-slider-2',
  1358. });
  1359. /*--
  1360. Product details 2 slick carousel as Nav
  1361. --------------------------------------------*/
  1362. $('.product-dec-slider-2').slick({
  1363. slidesToShow: 7,
  1364. slidesToScroll: 1,
  1365. vertical: true,
  1366. asNavFor: '.pro-dec-big-img-slider-2',
  1367. dots: false,
  1368. focusOnSelect:true,
  1369. fade: false,
  1370. arrows: false,
  1371. responsive: [
  1372. {
  1373. breakpoint: 1199,
  1374. settings: {
  1375. slidesToShow: 5,
  1376. slidesToScroll: 1,
  1377. }
  1378. },
  1379. {
  1380. breakpoint: 991,
  1381. settings: {
  1382. slidesToShow: 7,
  1383. slidesToScroll: 1,
  1384. }
  1385. },
  1386. {
  1387. breakpoint: 767,
  1388. settings: {
  1389. slidesToShow: 5,
  1390. slidesToScroll: 1,
  1391. }
  1392. },
  1393. {
  1394. breakpoint: 575,
  1395. settings: {
  1396. autoplay: true,
  1397. slidesToShow: 3,
  1398. }
  1399. }
  1400. ]
  1401. });
  1402. // Instantiate EasyZoom instances
  1403. // var $easyzoom = $('.easyzoom').easyZoom();
  1404. /*--------------------------------
  1405. Product details slider 5 active
  1406. -----------------------------------*/
  1407. $('.product-details-slider-5-active').slick({
  1408. slidesToShow: 1,
  1409. slidesToScroll: 1,
  1410. dots: false,
  1411. loop: true,
  1412. fade: false,
  1413. arrows: false,
  1414. });
  1415. /*--------------------------------
  1416. Product details tab small
  1417. -----------------------------------*/
  1418. $('.product-details-tab-small').slick({
  1419. slidesToShow: 5,
  1420. slidesToScroll: 1,
  1421. dots: false,
  1422. loop: true,
  1423. fade: false,
  1424. arrows: false,
  1425. responsive: [
  1426. {
  1427. breakpoint: 767,
  1428. settings: {
  1429. slidesToShow: 3,
  1430. slidesToScroll: 1,
  1431. }
  1432. }
  1433. ]
  1434. });
  1435. /*--------------------------
  1436. Tab active
  1437. ---------------------------- */
  1438. var ProductDetailsSmall = $('.product-details-tab-small a');
  1439. ProductDetailsSmall.on('click', function(e) {
  1440. e.preventDefault();
  1441. var $href = $(this).attr('href');
  1442. ProductDetailsSmall.removeClass('active');
  1443. $(this).addClass('active');
  1444. $('.product-details-tab-large .tab-pane').removeClass('active');
  1445. $('.product-details-tab-large ' + $href).addClass('active');
  1446. })
  1447. // $('.multiple-items').slick({
  1448. // infinite: true,
  1449. // slidesToShow: 3,
  1450. // slidesToScroll: 3
  1451. // });
  1452. // $('.slider-hero').slick({
  1453. // dots: false,
  1454. // lazyLoad: 'ondemand',
  1455. // // autoplay: true,
  1456. // // autoplaySpeed: 1000,
  1457. // slidesToShow: 4,
  1458. // slidesToScroll: 1,
  1459. // responsive: [
  1460. // {
  1461. // breakpoint: 1024,
  1462. // settings: {
  1463. // slidesToShow: 3,
  1464. // slidesToScroll: 3,
  1465. // infinite: true,
  1466. // }
  1467. // },
  1468. // {
  1469. // breakpoint: 600,
  1470. // settings: {
  1471. // slidesToShow: 2,
  1472. // slidesToScroll: 2
  1473. // }
  1474. // },
  1475. // {
  1476. // breakpoint: 480,
  1477. // settings: {
  1478. // slidesToShow: 1,
  1479. // slidesToScroll: 1
  1480. // }
  1481. // },
  1482. // {
  1483. // breakpoint: 1199,
  1484. // settings: {
  1485. // slidesToShow: 5,
  1486. // slidesToScroll: 1,
  1487. // }
  1488. // },
  1489. // {
  1490. // breakpoint: 991,
  1491. // settings: {
  1492. // slidesToShow: 3,
  1493. // slidesToScroll: 1,
  1494. // }
  1495. // },
  1496. // {
  1497. // breakpoint: 767,
  1498. // settings: {
  1499. // slidesToShow: 3,
  1500. // slidesToScroll: 1,
  1501. // }
  1502. // },
  1503. // {
  1504. // breakpoint: 575,
  1505. // settings: {
  1506. // autoplay: true,
  1507. // slidesToShow: 3,
  1508. // }
  1509. // }
  1510. // // You can unslick at a given breakpoint now by adding:
  1511. // // settings: "unslick"
  1512. // // instead of a settings object
  1513. // ]
  1514. // });
  1515. //pres overview slider
  1516. $(".press_slider-hero").slick({
  1517. dots: false,
  1518. lazyLoad: 'ondemand',
  1519. // autoplay: true,
  1520. // autoplaySpeed: 1000,
  1521. slidesToShow: 1,
  1522. slidesToScroll: 1,
  1523. responsive: [
  1524. {
  1525. breakpoint: 1024,
  1526. settings: {
  1527. slidesToShow: 1,
  1528. slidesToScroll: 1,
  1529. infinite: true,
  1530. }
  1531. },
  1532. {
  1533. breakpoint: 600,
  1534. settings: {
  1535. slidesToShow: 1,
  1536. slidesToScroll: 1
  1537. }
  1538. },
  1539. {
  1540. breakpoint: 480,
  1541. settings: {
  1542. slidesToShow: 1,
  1543. slidesToScroll: 1
  1544. }
  1545. },
  1546. {
  1547. breakpoint: 1199,
  1548. settings: {
  1549. slidesToShow: 1,
  1550. slidesToScroll: 1,
  1551. }
  1552. },
  1553. {
  1554. breakpoint: 991,
  1555. settings: {
  1556. slidesToShow: 1,
  1557. slidesToScroll: 1,
  1558. }
  1559. },
  1560. {
  1561. breakpoint: 767,
  1562. settings: {
  1563. slidesToShow: 1,
  1564. slidesToScroll: 1,
  1565. }
  1566. },
  1567. {
  1568. breakpoint: 575,
  1569. settings: {
  1570. autoplay: true,
  1571. slidesToShow: 1,
  1572. }
  1573. }
  1574. ]
  1575. });
  1576. setTimeout(()=>{
  1577. if(width<=600){
  1578. $('.same-style').find('svg path').attr('fill','#000')
  1579. }
  1580. },300)
  1581. })(jQuery);