Processing
 

IE / Firefox - $(window).on('popstate', function() {}

11/03/2014 14:02#1

Joined at: 5 months ago

Post: 1

Thank: 0

Thanked: 0

i have a problem with the HTML5 History / history.js

I use the History.pushState to replace the Link in the address-bar. Code:

function setLink() { var $this = $(this), url = $this.attr('data-location'), title = $this.attr('title')||null; History.pushState(null,title,url); } 

This works perfect in all Browsers. I reloaded the site, i use the $(window).on('popstate', function() {} to check if a pushState is in the history. Code:

$(window).on('popstate', function(e) { e.preventDefault(); var State = History.getState(), url = State.url, relativeUrl = url.replace(rootUrl,''); id = url.split("/")[4]; alert(url); alert(id);   alert("popstate-neu-1"); if (window.history.state !== null) {     $this = $('#' + id); setPortfolioIsotopeOpenArgs(); } else { alert("nothing here"); } }); 

This works perfect in Safari (Mac/Win and iOS) but in Firefox and IE it doesn't works. Have anyone an idea?

Thanks and sorry for my bad english. Greets from Austria

Similar articles

IE9 dosen't support my Button Tag

5 months ago - Reply: 0 - Views: 18

SSRS 2016 Web protal in IE8

5 months ago - Reply: 0 - Views: 17

how to handle @keyframes not supported by ie9?

5 months ago - Reply: 0 - Views: 5

Detect Windows XP in Firefox with JS

5 months ago - Reply: 1 - Views: 47

IE8 Not showing divs with floats

6 months ago - Reply: 2 - Views: 131

Including ECMA 5 script in IE8

6 months ago - Reply: 1 - Views: 98

XDomainRequest does not work in ie8 & ie9

6 months ago - Reply: 0 - Views: 11

How to minify angular.js?

6 months ago - Reply: 1 - Views: 32

VBA and IE8 - scrape text buried in table

6 months ago - Reply: 1 - Views: 39

Detect http satus IE10

6 months ago - Reply: 0 - Views: 8

how to compress angular.js?

6 months ago - Reply: 0 - Views: 4

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re