暫無描述
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 55KB

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