Thread:Fandyllic/@comment-27075564-20170724155029/@comment-1077307-20170801025202

Please push "#266779" as soon as possible.

This is the complete and correct fix for your slider implementation based on JQuery tabs implementation, in this Wikia environment.

It no longer has a race condition with the current JQuery.ui load and initialize state. And now works regardless of how the debug settings are set, or which modules load behind the requested jquery.ui.tabs load.

You were getting lucky. When the initialization for your slider was directly connected to the load complete for ui.tabs, it would run very early, earlier than dom complete, and earlier than other, later multiple successive load and inits of ui.tabs and other JQuery random modules reloads (something that is very common on Wikia). And depending on which other modules and whether they were getting loaded in one file or after another round trip to get a separate file, the ui.tabs state may not exist all of the sudden, during your witcher slider init.

The fix follows a common pattern codified in a well known way, where your slider init is instead hooked to a common JQuery/DOM ready function controlled outside your slider code. This makes your slider much more like a module, and places the burden on Common.js to know best when to init the modules, similar to the articleImport, but for various modules added to the Common.js directly.