Hi,
In Tapestry 5.4.X versions "$(window).on('load', function ()" is never call it
for requireJs. So you can create a module as:
my-affix-module.js (into META-INF/modules folder) with the code
define([“jquery”, “bootstrap/affix"], function($) {
return function(){
$('#myAffix').affix({
options...
});
}
});
And require it on .java
void afterRender() {
_javaScriptSupport.require(“my-affix-module”);
}
I think it works
Regards
Carlos Montero
> El 21/6/2016, a las 13:29, D.R. <[email protected]> escribió:
>
> Hi,
>
> i try this example:
> http://www.w3schools.com/bootstrap/bootstrap_affix.asp
>
> with
> void afterRender() {
> _javaScriptSupport.require("bootstrap/affix");
> }
>
> in a T5.4.1 environment, and the affix.js is loaded, require.js and jquery.js
> do some initialization, but the
> $(window).on('load', function ()
> is never executed. The js debugger never stops inside that function.
>
> Any hint what to do in order to get that working?
>
>
> Kind regards
> David
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>