PushState for Internet Explorer?

I know that IE does not support pushState, but I want my users with a modern browser to take advantage, while users using older browsers do not use it.

Currently, javascript code prevents the full operation of nested navigation in IE, which means you cannot see a lot of content.

Does anyone know a solution to my problem?

Here is my JavaScript code:

var tabContents = $(".tab_content").hide(), tabs = $(".tab_nav li"); tabs.first().addClass("active").show(); tabContents.first().show(); tabs.click(function() { var $this = $(this), activeTab = $this.find('a').attr('href'); history.pushState(null, '', activeTab); if(!$this.hasClass('active')){ $this.addClass('active').siblings().removeClass('active'); tabContents.hide().filter(activeTab).fadeIn(); } return false; }); $(window).bind('popstate', function(){ $.getScript(location.href); }); 
+6
source share
1 answer

Try jQuery BBQ: button bar and query library . I have used it with great success.

+4
source

Source: https://habr.com/ru/post/893537/


All Articles