Support » Plugin: Enable jQuery Migrate Helper » How should I replace the deprecated .toggle

  • Hi every body,
    I have fixed all deprecated codes in my website except .toggle :/
    I am not a developer, just a WP fan using plugings to make my own website.
    Right now Enable jQuery Migrate Helper plugin helps me to keep my site unbroken.
    But soon after WP5.6, This won’t be an option anymore.
    So please help me to fix this .toggle issue.
    In the js code below, .toggle is appearing 2 times.
    I know I must replace those with some other new modern code lines but I was not able to find with what.
    If you could tell me the solution to fix this .toggle(function() deprecated code, I’ll be really glad.
    Have a great day !
    !function(e){"use strict";e=jQuery,jQuery(document).ready(function(e){function i(){return window.innerWidth<500?1:window.innerWidth<1e3?2:window.innerWidth<1170?3:4}if(e(".price_slider_amount").css("opacity","1"),e(".bk-tabs-wrapper").find(".bk-module-tabs").addClass("mobileoff"),e(window).width()<=639?e(".bk-tabs-wrapper").hasClass("bk-mobile-detect")||e(".bk-tabs-wrapper").addClass("bk-mobile-detect"):e(".bk-tabs-wrapper").hasClass("bk-mobile-detect")&&e(".bk-tabs-wrapper").removeClass("bk-mobile-detect"),e(window).resize(function(){e(".bk-tabs-wrapper").find(".bk-module-tabs").hasClass("mobileon")&&(e(".bk-tabs-wrapper").find(".bk-module-tabs").removeClass("mobileon"),e(".bk-tabs-wrapper").find(".bk-module-tabs").addClass("mobileoff")),e(window).width()<=639?e(".bk-tabs-wrapper").hasClass("bk-mobile-detect")||e(".bk-tabs-wrapper").addClass("bk-mobile-detect"):e(".bk-tabs-wrapper").hasClass("bk-mobile-detect")&&e(".bk-tabs-wrapper").removeClass("bk-mobile-detect")}),e(".bk-tabs-wrapper").click(function(){return e(this).hasClass("bk-mobile-detect")?void(e(this).find(".bk-module-tabs").hasClass("mobileoff")?(e(this).find(".bk-module-tabs").removeClass("mobileoff"),e(this).find(".bk-module-tabs").addClass("mobileon")):(e(this).find(".bk-module-tabs").removeClass("mobileon"),e(this).find(".bk-module-tabs").addClass("mobileoff"))):!1}),e("#"+ajax_c.tickerid).ticker({titleText:ajax_c.tickertitle,direction:"ltr",controls:!1}),setTimeout(function(){var i=e(".ticker-title").find("span").width();e(".ticker-title").css("width",i),e(".bk-ticker-wrapper").css("opacity","1")},1e3),e(".module-video-playlist").length){var t,a;e(".module-video-playlist").find(".thumb").removeClass("hide-thumb"),e(".module-video-playlist").find(".bk-video-item:first-child").addClass("active"),t=e(".module-video-playlist").find(".bk-video-item:first-child").attr("data-id").split("&+"),a=e(".module-video-playlist").find(".bk-frame-wrap"),"v"==t[0]?a.append('<iframe src="//player.vimeo.com/video/'+t[1]+'?api=1&title=0&byline=0&portrait=0&color=ffffff"></iframe>'):"y"==t[0]&&(1==gloria_ssl[0]?a.append('<iframe width="1050" height="591" src="https://www.youtube.com/embed/'+t[1]+'" allowFullScreen ></iframe>'):a.append('<iframe width="1050" height="591" src="http://www.youtube.com/embed/'+t[1]+'" allowFullScreen ></iframe>')),e(".bk-playlist-wrap").find("li").click(function(i){i.preventDefault(),e(this).hasClass("active")||(e(".bk-playlist-wrap").find("li").removeClass("active"),e(this).addClass("active"),t=e(this).attr("data-id").split("&+"),a=e(this).parents(".bk-playlist-wrap").siblings().children(),a.empty(),a.append('<div class="bk-preload"></div>'),"v"==t[0]?a.append('<iframe src="//player.vimeo.com/video/'+t[1]+'?api=1&title=0&byline=0&portrait=0&color=ffffff"></iframe>'):"y"==t[0]&&(1==gloria_ssl[0]?a.append('<iframe width="1050" height="591" src="https://www.youtube.com/embed/'+t[1]+'" allowFullScreen ></iframe>'):a.append('<iframe width="1050" height="591" src="http://www.youtube.com/embed/'+t[1]+'" allowFullScreen ></iframe>')))}),e(".bk-playlist").mCustomScrollbar({theme:"light"})}e(".bk-links-remember").click(function(){event.preventDefault(),e(this).parents(".bk-form-wrapper").hide(),e(this).parents(".bk-form-wrapper").siblings(".bk-remember-form-wrapper").fadeIn(500)}),e(".bk-back-login").click(function(){event.preventDefault(),e(this).parents(".bk-form-wrapper").hasClass("bk-remember-form-wrapper")?e(this).parents(".bk-form-wrapper").siblings(".bk-register-form-wrapper").hide():e(this).parents(".bk-form-wrapper").hasClass("bk-register-form-wrapper")&&e(this).parents(".bk-form-wrapper").siblings(".bk-remember-form-wrapper").hide(),e(this).parents(".bk-form-wrapper").hide(),e(this).parents(".bk-form-wrapper").siblings(".bk-login-form-wrapper").fadeIn(500)}),e(".bk-links-register-inline").click(function(){event.preventDefault(),e(this).parents(".bk-form-wrapper").hide(),e(this).parents(".bk-form-wrapper").siblings(".bk-register-form-wrapper").fadeIn(500)}),e("#main-mobile-menu").css("display","block"),e("#mobile-menu > ul > li.menu-item-has-children").prepend('<div class="expand"><i class="fa fa-chevron-down"></i></div>'),e("#mobile-top-menu > ul > li.menu-item-has-children").prepend('<div class="expand"><i class="fa fa-chevron-down"></i></div>'),e(".expand").click(function(){e(this).siblings(".sub-menu").toggle(300)}),e(".widget-tabs .widget-tab-titles li").click(function(){e(this).siblings("li").removeClass("active"),e(this).addClass("active"),e(this).parents(".widget-tabs").find(".tab-content").hide();var i=e(this).find("a").attr("href");return e(this).parents(".widget-tabs").find(i).show(),!1}),e(".widget-review-tabs .widget-tab-titles li").click(function(){e(this).siblings("li").removeClass("active"),e(this).addClass("active"),e(this).parents(".widget-review-tabs").find(".reviews-tab-content").hide();var i=e(this).find("a").attr("href");return e(this).parents(".widget-review-tabs").find(i).show(),!1}),e(".module-carousel").removeClass("hide"),e(".bk-embed-video").fitVids(),e(".single .article-content").fitVids();e(window).width(),e(window).height();e("#ajax-form-search").click(function(){0==e(".ajax-form input").height()?(e(".ajax-form input").css("height","48px"),e(".ajax-form").css("padding","0 54px 0 0"),e(".ajax-form input").css("padding","8px 12px"),e(".ajax-form input").css("font-size","14px"),e(".ajax-form input").val("")):(e(".ajax-form input").css("height","0"),e(".ajax-form").css("padding","0"),e(".ajax-form input").css("padding","0"),e(".ajax-form input").css("font-size","0"),e("#ajax-search-result").empty().css("height","auto"),e("#ajax-search-result").css({"box-shadow":"none"}),e(".ajax-search-wrap").css({width:"0px"}))}),e("#search-form-text").keyup(function(){var i=e(this).val(),t=e("#ajax-search-result");e(".ajax-search-wrap").css({width:"350px"}),setTimeout(function(){if(i){var a=e("#ajax-search-result");a.fadeIn(300).html('<div class="loading-img-wrap"><div class="bk-preload"></div></div>');var s={action:"bk_ajax_search",s:i};e.post(ajaxurl,s,function(i){i=e.parseJSON(i),e("#ajax-search-result").empty().hide().css("height","auto").html(i.content).fadeIn(300).css("height",a.height()),setTimeout(function(){e(t).find(".thumb").removeClass("hide-thumb"),e(t).css({"box-shadow":"0px 1px 3px 1px rgba(0, 0, 0, 0.2)"})},150)})}else e("#ajax-search-result").fadeOut(300,function(){e(this).empty().css("height","auto"),e(t).css({"box-shadow":"none"})})},450)}),1==e("#page-content-wrap").children(".bksection:first-child").find(".bkmodule:first-child").hasClass("module-feature-2")&&(e(".header-wrap").hasClass(".bk-header-90-sport-2")?e("#page-content-wrap").css("margin-top","40px"):e("#page-content-wrap").css("margin-top",0)),e(".img-popup-link").magnificPopup({type:"image",removalDelay:300,mainClass:"mfp-fade",closeOnContentClick:!0,closeBtnInside:!1,fixedContentPos:!0,image:{verticalFit:!0}}),"undefined"!=typeof justified_ids&&e.each(justified_ids,function(i,t){e(".justifiedgall_"+t).justifiedGallery({rowHeight:200,fixedHeight:!1,lastRow:"justify",margins:4,randomize:!1,sizeRangeSuffixes:{lt100:"",lt240:"",lt320:"",lt500:"",lt640:"",lt1024:""}})}),e(".zoom-gallery").each(function(){e(this).magnificPopup({delegate:"a.zoomer",type:"image",closeOnContentClick:!1,closeBtnInside:!1,mainClass:"mfp-with-zoom mfp-img-mobile",image:{tError:'<a href="%url%">The image #%curr%</a> could not be loaded.',verticalFit:!0,titleSrc:function(e){return' <a class="image-source-link" href="'+e.el.attr("data-source")+'" target="_blank">'+e.el.attr("title")+"</a>"}},gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]},zoom:{enabled:!0,duration:600,easing:"ease",opener:function(e){return e.find("img")}}})}),e("#bk-gallery-slider").each(function(){e(this).magnificPopup({delegate:"a.zoomer",type:"image",closeOnContentClick:!1,closeBtnInside:!1,removalDelay:300,mainClass:"mfp-fade",image:{tError:'<a href="%url%">The image #%curr%</a> could not be loaded.',verticalFit:!0,titleSrc:function(e){return' <a class="image-source-link" href="'+e.src+'" target="_blank">'+e.el.attr("title")+"</a>"}},gallery:{enabled:!0,navigateByImgClick:!0,preload:[0,1]}})});var s=e(window).height()/2-e(".share-sticky").height()/2;e(".share-sticky").css("top",s),e(".share-sticky-open").css("top",e(window).height()/2),e(window).resize(function(){if(s=e(window).height()/2-e(".share-sticky").height()/2,e(".share-sticky").css("top",s),e(".share-sticky-open").css("top",e(window).height()/2),"undefined"!=typeof flexslider){var t=i();flexslider.vars.minItems=t,flexslider.vars.maxItems=t}});var o='<div class="bk-slider-prev bk-control-nav"><i class="fa fa-angle-left"></i></div>',n='<div class="bk-slider-next bk-control-nav"><i class="fa fa-angle-right"></i></div>';if(e(".gallery-runner").slick({speed:500,centerMode:!0,infinite:!0,variableWidth:!0,autoplay:!0,autoplaySpeed:4e3,prevArrow:o,nextArrow:n}),e(".gallery-wrap").imagesLoaded(function(){setTimeout(function(){e(".gallery-runner").siblings(".bk-preload").addClass("hide"),e(".gallery-runner").removeClass("opacity-zero"),e(".gallery-wrap").removeClass("background-preload")},300)}),e(".feature-2-runner").slick({speed:500,centerMode:!0,infinite:!0,centerPadding:"220px",slidesToShow:1,autoplay:!0,autoplaySpeed:4e3,prevArrow:o,nextArrow:n,responsive:[{breakpoint:1200,settings:{centerMode:!0,centerPadding:"145px",slidesToShow:1}},{breakpoint:992,settings:{centerMode:!0,centerPadding:"90px",slidesToShow:1}},{breakpoint:768,settings:{centerMode:!0,centerPadding:"0",slidesToShow:1}},{breakpoint:510,settings:{arrows:!1,centerMode:!0,centerPadding:"0",slidesToShow:1}}]}),e(".bk-header-slickrunner").slick({speed:500,centerMode:!0,infinite:!0,centerPadding:"300px",slidesToShow:1,autoplay:!0,autoplaySpeed:4e3,prevArrow:o,nextArrow:n,responsive:[{breakpoint:1200,settings:{centerMode:!0,centerPadding:"220px",slidesToShow:1}},{breakpoint:992,settings:{centerMode:!0,centerPadding:"145px",slidesToShow:1}},{breakpoint:768,settings:{centerMode:!0,centerPadding:"0",slidesToShow:1}},{breakpoint:510,settings:{arrows:!1,centerMode:!0,centerPadding:"0",slidesToShow:1}}]}),e(".module-feature-2").imagesLoaded(function(){setTimeout(function(){e(".feature-2-wrapper").siblings(".bk-preload").addClass("hide"),e(".feature-2-wrapper").removeClass("opacity-zero"),e(".module-feature-2").removeClass("background-preload"),e(".module-feature-2").find(".thumb").removeClass("hide-thumb"),e(".bk-header-slickslider").removeClass("loading")},300)}),e(".flexslider").imagesLoaded(function(){e(".module-main-feature .flexslider").flexslider({animation:"slide",controlNav:!1,animationLoop:!0,slideshow:!0,pauseOnHover:!0,slideshowSpeed:8e3,animationSpeed:600,smoothHeight:!0,directionNav:!0,prevText:"",nextText:""}),e(".module-grid .flexslider").flexslider({animation:"slide",controlNav:!1,animationLoop:!0,slideshow:!0,pauseOnHover:!0,slideshowSpeed:8e3,animationSpeed:600,smoothHeight:!0,directionNav:!0,prevText:"",nextText:""}),e(".bk-slider-module .flexslider").flexslider({animation:"slide",controlNav:!1,animationLoop:!0,slideshow:!0,pauseOnHover:!0,slideshowSpeed:8e3,animationSpeed:600,smoothHeight:!0,directionNav:!0,prevText:"",nextText:""}),e(".bk-header-slider .flexslider").flexslider({animation:"fade",controlNav:!1,animationLoop:!0,slideshow:!0,pauseOnHover:!0,slideshowSpeed:8e3,animationSpeed:600,smoothHeight:!0,directionNav:!0,nextText:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="60px" height="80px" viewBox="0 0 49 77" xml:space="preserve"><polyline fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" points="0.375,0.375 45.63,38.087 0.375,75.8 "></polyline></svg>',prevText:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="60px" height="80px" viewBox="0 0 49 77" xml:space="preserve"><polyline fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" points="45.63,75.8 0.375,38.087 45.63,0.375 "></polyline></svg>'});var i=new Array;i=e(".bk-header-slider").find(".thumb");var t=e(".bk-header-slider").find(".flexslider");if(t.css("height",e(window).height()),i.each(function(){e(this).css("height",e(window).height())}),e(".bk-scrolldown-button").click(function(){var i=e(".bk-destination-point").offset().top;e("body,html").animate({scrollTop:i},1e3,"easeInOutQuart")}),e(".bk-header-loader").removeClass("loading"),e(window).resize(function(){e(".bk-scrolldown-button").unbind("click"),t.css("height",e(window).height()),i.each(function(){e(this).css("height",e(window).height())}),e(".bk-scrolldown-button").click(function(){var i=e(".bk-destination-point").offset().top;e("body,html").animate({scrollTop:i},1e3,"easeInOutQuart")})}),e(".widget_comment").flexslider({animation:"slide",controlNav:!1,animationLoop:!0,slideshow:!0,pauseOnHover:!0,slideshowSpeed:8e3,animationSpeed:600,smoothHeight:!0,directionNav:!0,prevText:"",nextText:""}),e(".widget-twitter .flexslider").flexslider({animation:"slide",controlNav:!0,animationLoop:!0,slideshow:!0,pauseOnHover:!0,slideshowSpeed:8e3,animationSpeed:600,smoothHeight:!0,directionNav:!1,prevText:"",nextText:""}),e(".widget_slider .flexslider").flexslider({animation:"slide",controlNav:!1,animationLoop:!0,slideshow:!0,pauseOnHover:!0,slideshowSpeed:8e3,animationSpeed:600,smoothHeight:!0,directionNav:!0,prevText:"",nextText:""}),"undefined"!=typeof megamenu_carousel_el){var a;e.each(megamenu_carousel_el,function(i,t){a=e("#"+i).find(".bk-sub-post").length,a>=t?e("#"+i).flexslider({animation:"slide",animationLoop:!0,slideshow:!1,itemWidth:10,minItems:t,maxItems:t,controlNav:!1,directionNav:!0,slideshowSpeed:8e3,animationSpeed:600,prevText:"",nextText:"",move:1,touch:!0,useCSS:!0}):(e("#"+i).removeClass("flexslider"),e("#"+i).addClass("flexslider_destroy"))})}e(".product.flexslider ul li").length>3?e(".product.flexslider").flexslider({animation:"slide",animationLoop:!1,directionNav:!0,controlNav:!1,itemWidth:50,minItems:1,maxItems:3,prevText:"",nextText:""}):e(".product").removeClass("flexslider")}),e(".carousel_2 .bk-carousel-wrap").flexslider({animation:"slide",controlNav:!1,itemWidth:270,columnWidth:1,pauseOnHover:!0,move:1,animationLoop:!0,slideshowSpeed:8e3,animationSpeed:600,prevText:"",nextText:"",minItems:1,maxItems:2}),e(".carousel_3 .bk-carousel-wrap").flexslider({animation:"slide",controlNav:!1,itemWidth:270,columnWidth:1,pauseOnHover:!0,move:1,animationLoop:!0,slideshowSpeed:8e3,animationSpeed:600,prevText:"",nextText:"",minItems:1,maxItems:3}),e(".module-grid-carousel .bk-carousel-wrap").flexslider({animation:"slide",controlNav:!1,itemWidth:270,columnWidth:1,pauseOnHover:!0,move:1,animationLoop:!0,slideshowSpeed:8e3,animationSpeed:600,prevText:"",nextText:"",minItems:1,maxItems:4}),e(".module-grid-carousel").imagesLoaded(function(){setTimeout(function(){e(".bk-grid-carousel-inner").children(".bk-preload").addClass("hide"),e(".bk-grid-carousel-inner").children(".bk-carousel-wrap").removeClass("opacity-zero"),e(".bk-grid-carousel-inner").removeClass("background-preload")},300)}),e("#page-wrap").imagesLoaded(function(){setTimeout(function(){e(".bk-masonry-content").find(".item").length>2&&e(".bk-masonry-content").masonry({itemSelector:".item",columnWidth:1,isAnimated:!0,isFitWidth:!0}),e(".ajax-load-btn").addClass("active"),e(".bk-masonry-content").find(".post-c-wrap").removeClass("sink"),e(".bk-masonry-content").find(".post-category").removeClass("sink")},500)}),e(".menu-toggle").toggle(function(){e(".open-icon").removeClass("hide"),e(".close-icon").addClass("hide"),e(".share-label").addClass("hide"),e(".top-share").removeClass("hide")},function(){e(".close-icon").removeClass("hide"),e(".open-icon").addClass("hide"),e(".share-label").removeClass("hide"),e(".top-share").addClass("hide")}),e(window).scroll(function(){e(this).scrollTop()>500?e("#back-top").css("bottom","0"):e("#back-top").css("bottom","-34px")}),e("#back-top").click(function(){return e("body,html").animate({scrollTop:0},1300),!1}),"undefined"!=typeof fixed_nav&&2==fixed_nav){var r=e("nav.main-nav"),l=r.offset().top;e(window).scroll(function(){if(e(window).width()<=991)return r.removeClass("fixed"),e(".main-nav").css("margin-top","0"),!1;if(e(this).scrollTop()>l){r.addClass("fixed");var i=e("#wpadminbar");0!=i.length&&e(".main-nav").css("margin-top",i.height())}else r.removeClass("fixed"),e(".main-nav").css("margin-top","0")})}var d=e(".parallax_enable");0!==d.length&&e(window).scroll(function(){var i=-(e(window).scrollTop()/3.5),t="50% "+i+"px";d.css("background-position",t)});var p=e(".rating-canvas");e.each(p,function(i,t){var a=e(t).data("rating"),s=t.getContext("2d");t.width=e(t).parent().width(),t.height=e(t).parent().height();var o=t.width/2,n=t.height/2;if(e(t).parents().hasClass("rating-wrap"))var r=(t.width-6)/2,l=2;else var r=(t.width-10)/2,l=4;var d=Math.PI*a*2/100;s.beginPath(),s.arc(o,n,r,-(Math.PI/180*90),d-Math.PI/180*90,!1),s.lineWidth=l,s.strokeStyle="#fff",s.stroke()}),e(".bk-tipper-bottom").tipper({direction:"bottom"});var c,h,m,f;c=e(window);var u=e(".sidebar-wrap").width();h=function(){f=c.scrollTop(),e(".sidebar-wrap.stick").each(function(){var i,t,a,s,o,n,r=0,l="#"+e(this).attr("id");if(i=e(l).offset().top+e(l).outerHeight(!0),t=c.scrollTop()+c.height(),a=e(l).parents(".bksection").offset().top,s=e(l).parents(".bksection").height(),o=a+s,n=e(l).parents(".bksection").hasClass("bk-in-single-page")?s-e(l).outerHeight(!0)-36:s-e(l).outerHeight(!0),window.innerWidth>991&&s>e(l).outerHeight(!0))if(c.scrollTop()<a?r=0:c.scrollTop()>=a&&o>t?f>=m?r=1:m>f&&(r=3):t>=o&&(r=2),0==r)e(l).css({position:"static",top:"auto",bottom:"auto"});else if(1==r)if(c.height()>e(l).outerHeight(!0)){var d=e("#wpadminbar");if("undefined"!=typeof fixed_nav&&2==fixed_nav)if(0!=d.length)var p=16+d.height()+e(".main-nav").height()+"px";else var p=16+e(".main-nav").height()+"px";else if(0!=d.length)var p=16+d.height()+"px";else var p="16px";e(l).css({position:"fixed",top:p,bottom:"auto",width:u})}else i>t?(n=e(l).parents(".bksection").hasClass("bk-in-single-page")?e(l).offset().top-a-36:e(l).offset().top-a,e(l).css({position:"absolute",top:n,bottom:"auto",width:u})):e(l).css({position:"fixed",top:"auto",bottom:"16px",width:u});else if(3==r)if(c.scrollTop()>e(l).offset().top)n=e(l).parents(".bksection").hasClass("bk-in-single-page")?e(l).offset().top-a-36:e(l).offset().top-a,e(l).css({position:"absolute",top:n,bottom:"auto",width:u});else{var d=e("#wpadminbar");if("undefined"!=typeof fixed_nav&&2==fixed_nav)if(0!=d.length)var p=16+d.height()+e(".main-nav").height()+"px";else var p=16+e(".main-nav").height()+"px";else if(0!=d.length)var p=16+d.height()+"px";else var p="16px";e(l).css({position:"fixed",top:p,bottom:"auto",width:u})}else if(2==r)if(c.height()>e(l).outerHeight(!0)){var h=0;if(f>=m?h=1:m>f&&(h=2),1==h&&o>i||2==h&&c.scrollTop()<e(l).offset().top){var d=e("#wpadminbar");if("undefined"!=typeof fixed_nav&&2==fixed_nav)if(0!=d.length)var p=16+d.height()+e(".main-nav").height()+"px";else var p=16+e(".main-nav").height()+"px";else if(0!=d.length)var p=16+d.height()+"px";else var p="16px";e(l).css({position:"fixed",top:p,bottom:"auto",width:u})}else e(l).css({position:"absolute",top:n,bottom:"auto",width:u})}else e(l).css({position:"absolute",top:n,bottom:"auto",width:u});e(l).parent().css("height",e(l).height())}),m=f},e(".sidebar-wrap.stick").each(function(){e(this).wrap("<div class='bk-sticksb-wrapper'></div>")}),setTimeout(function(){c.on("scroll",h)},2e3),c.resize(function(){e(".sidebar-wrap.stick").each(function(){var i="#"+e(this).attr("id");window.innerWidth>991?e(this).parent().hasClass("bk-sticksb-wrapper")&&(u=e(".bk-sticksb-wrapper").width(),e(i).css({width:u})):e(i).css({position:"static",top:"auto",bottom:"auto"})})})})}(jQuery);

    • This topic was modified 1 year, 5 months ago by buffereso.
Viewing 1 replies (of 1 total)
  • Plugin Author Marius L. J.

    (@clorith)

    Hi there,

    The first instance is fine (it shows/hides an element).

    The only thing you need to address is the 2nd instance, which is using callback functions to handle the event of opening/closing something (the bit with .toggle(function() {).

    Without knowing what your code is meant to do (and because it’s been minified, meaning variables and such are replaced with short letters), it’s hard to tell you what is going on and what the intended behavior is supposed to be.

    A somewhat educated guess is that this is changing the icon on a button or label of some kind when a menu is open/closed, this same behavior can be achieved with CSS styling, and is a much better solution.

Viewing 1 replies (of 1 total)
  • The topic ‘How should I replace the deprecated .toggle’ is closed to new replies.