JAVASCRIPT   65
mCustomScrollbar
Guest on 8th June 2022 09:05:35 AM


  1. $(function () {
  2.     $(window).resize(function () {
  3.         var widinwi=$(window).width();
  4.         $(".htglnr").css({
  5.             "min-height":$(window).height()-$(".htgltop").outerHeight(true)-$(".htgldlxx").outerHeight(true)-60
  6.         })
  7.         if(widinwi<=1280){
  8.             $(".htglcjwt li").css({
  9.                 "margin-right":"2%"
  10.             });
  11.             $(".htglcjwt li:nth-child(2n)").css({
  12.                 "margin-right":"0"
  13.             });
  14.         }else {
  15.             $(".htglcjwt li").css({
  16.                 "margin-right":"4%"
  17.             });
  18.             $(".htglcjwt li:nth-child(4n)").css({
  19.                 "margin-right":"0"
  20.             });
  21.         }
  22.         $(".htglnav").css({
  23.             "height":$(window).height()-$(".htgllogo").outerHeight(true)
  24.         });
  25.         $(".af-content").mCustomScrollbar("destroy");
  26.         $(".af-content").mCustomScrollbar({
  27.             mouseWheel:true,
  28.             scrollButtons:{
  29.                 enable:true
  30.             }
  31.         });
  32.     }).resize()
  33. });

Raw Paste

Login or Register to edit or fork this paste. It's free.