Re: [SMW-devel] JavaScript in SMW: addOnloadHook removed

2010-10-13 Thread Denny Vrandecic
Thanks Jeroen, this was insightful! So if we wrap the call addOnloadHook(smw_tooltipInit); into a $j(function() { addOnloadHook(smw_tooltipInit); }); it should work, but it seems that $j is not defined yet when SMW_tooltip.js is included. So it seems to break there, as jQuery is not loaded

Re: [SMW-devel] JavaScript in SMW: addOnloadHook removed

2010-10-13 Thread Jeroen De Dauw
Hey, The problem is coming from the Resource Loader [0] changes in MediaWiki 1.17, which loads JavaScript, such as wikibits.js, which contains addOnloadHook, at the end of page. Scripts attempting to use it before that point break. The solution is to simply use the resource loader when it's availa