There should be a way in the Soothstate js to load the whole document if one need to? so we dont have to specify container Id it will just reload the whole content. I did some experiment and had to modify the script a bit.
I used this small piece of code to replace HTML content of whole document:
document.open("text/html", "replace");
document.write(data);
document.close();
This will execute all my scripts correctly and load the page like we normally do but with a transition giving user a transition experience without reload the page.
** onReady will be Like this **
onReady: {
duration: 0,
render: function ($container, $newContent) {
$container.removeClass('is-exiting');
var currentUrl = $container.data('smoothState').href;
var cache = $container.data('smoothState').cache;
var currentPageCache = cache[currentUrl];
document.open("text/html", "replace");
document.write(currentPageCache.doc);
document.close();
}
}
There should be a way in the Soothstate js to load the whole document if one need to? so we dont have to specify container Id it will just reload the whole content. I did some experiment and had to modify the script a bit.
I used this small piece of code to replace HTML content of whole document:
document.open("text/html", "replace");
document.write(data);
document.close();
This will execute all my scripts correctly and load the page like we normally do but with a transition giving user a transition experience without reload the page.
** onReady will be Like this **
onReady: {
duration: 0,
render: function ($container, $newContent) {