JQuery $ (document). already broken in Iron / Chrome

I wrote a small image slide show using jQuery and jFancyTiles, which can be seen here:

http://www.netzwerkag.at

It works as expected in firefox and IE, but not in iron / chrome. The problem seems to be related to document time. Already in chrome:

  • In line 76, the active class is set to the numbered round buttons in the lower right corner of the header image. It works!

  • On line 83, the image is changed by calling the fancy-tile function; this does not work in chrome, at least not at this time.

When I open iron_js_console with ctrl-shift-j and manually call the function, everything works.

In addition, if I wait 10 seconds, it even proceeds to the next image, in all browsers no previous steps are required.

The first fancytiles call does not work in iron / chrome. This is called the jquery document.ready event.

//What can I do?

+6
source share
1 answer

I ran into a similar issue with both FF4 and Chrome. jQuery(document).ready didn't work. I was able to get it to work with jQuery(window).load . I'm not sure what has changed in FF4, but they seem to have made it more like the way Chrome does things. When I changed it to use jQuery(window).load , it also cleared up the problems that I had in Chrome.

+10
source

Source: https://habr.com/ru/post/885517/


All Articles