$(document).on 'ready page:load' - not working in ie10 correctly

拥有回忆 提交于 2019-12-24 03:37:21

问题


i am developing in rails. for jquery i use coffeescript. turbolinks are active.

i have an issue and it gets me on my nerves.

when i want to start my function (here called scripts) i use the following code:

$(document).on 'ready page:load', =>
    scripts()

my script (div slider) is running when page is loaded, without any problems in all browsers.

anyway, when i click on another page and then get back to the start, the javascript is not loading. this issue is actually only in ie10.

i tried the following already:

$(document).on 'ready page:change', =>
    scripts()

.. but then the div slider gets out of control. it jumps nonrational. ;-)

what can i do? any ideas?

thank you!

st


回答1:


You can try with

$(document).on 'ready, page:change', =>
    scripts()

add a comma between ready and page:change, to separate both parameters.



来源:https://stackoverflow.com/questions/22789461/document-on-ready-pageload-not-working-in-ie10-correctly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!