The following gwt jsni method code only "works" when I have firebug open, I presume because its slowing down the page rendering long enough for the external js files to finish loading.
What am I doing wrong that its not waiting for the jquery plugin to finish loading before attempting to execute?
private native void makeHtml(Element element)
/*-{
$wnd.$().ready(function(){
try{
$wnd.$(element).wmd({"preview": true});
alert(1);
}
catch(e)
{
alert(e);
}
});
}-*/;