0

my navigation no longer works. Can someone help me, that the code work with the new jquery library in wordpress?

The problem must be "toggle" - but I don't know how to replace it.

(function($) {
$('#toggle').toggle( 
    function() {
        $('#popout').animate({ left: 0 }, 'slow', function() {
            $('#toggle').html('<span class="mi4"><i class="fa fa-times fa2" aria-hidden="true"></i></span>');
        });
    }, 
    function() {
        $('#popout').animate({ left: -255 }, 'slow', function() {
            $('#toggle').html('<span class="mi4"><i class="fa fa-bars fa2" aria-hidden="true"></i></span>');
        });
    }
);
})(jQuery);
Gblack
  • 1
  • 1
  • 1
    That looks like ancient code. https://api.jquery.com/toggle-event/ was [removed from jQuery back in v1.9](https://api.jquery.com/toggle-event/) – j08691 Feb 22 '21 at 15:12
  • Yes, I know that this no longer works with jQuery v 1.9, but how can I make it work again with new code? – Gblack Feb 22 '21 at 15:19

0 Answers0