javascriptjquerysmoothstate.js

TypeError: undefined from smoothstate.js causing error after second url click


I have implemented smoothstate.js into my website http://www.hotelieracademy.com

I get an TypeError: undefined is not a function (evaluating 'html.replace') on the second link click.

I can't seem to find the cause of it.

I load jQuery from the CDN and I have smoothstate.js javascript at the top of my main.js which I load asynchronously.

Any ideas?


Solution

  • When the first click happen, jQuery is reloaded. See network panel of the debugger.

    But the plugin smoothState is not reloaded, hence the TypeError: undefined is not a function