miguel-perez / smoothState.js

Unobtrusive page transitions with jQuery.
MIT License
4.43k stars 508 forks source link

handle events when using the load method. #353

Open federicovezzoli opened 6 years ago

federicovezzoli commented 6 years ago

I'm using the .load(url) method to enable smoothstate on an element outside the container.

The content is correctly loaded but no event is fired, so it seems impossible to make the transition smoother and rebind the correct scripts since I don't exactly know when the content is loaded in the dom.

The code is some very basic:

$(".logo").on("click",function(){
    sv.smoothState.load($(this).attr("href"));
    return false;
});

anyone can help? thanks a lot