Closed page7 closed 9 years ago
Sorry. Also there is some wrong with this update. Don't commit now. I will update again.
Why set <script>
with "src" to obj.scripts ?
jquery .html function let "ready" event after loaded script files ( same in ajax ).
but in pjax, "ready" will run frist.
I try to use $.holdReady() to delay the "ready" on pjax page, but no effect...
This is a known issue; see #331
We won't make the change you suggested because that would break other use cases. Namely, scripts on a specific page often expect that markup is already initialized on that page.
To solve your case, please ensure that preload()
is a function defined globally in your javascript environment even before pjax navigation (such as in site's <head>
).
But only use jquery html will do the "ready" method after script file loaded. I create a new reday deferred in pjax. so it do well now. I will push the update again to show you.
inline script need js file be loaded, like plugin file. without event "pjax:end" or other.