Hi,
In my application i am using GWT Cell Table, for some of the Column Header i want to add tooltip.Column Header is created by using SafeHtml and Injecting JS to cell table header using JSNI. But that time the DOM is not creating and JavaScript is not attaching to the column Header for tooltip.If i use Timer then the Problem is goes off,I don't want to use Timer.Is there any Way to inject JS?Any Clue?See below code,
Column Header SafeHtml:
SafeHtml="<span>Total</span><span title='' rel='tooltipTop' class='reqFull' data-original-title='{0}'> <i class='fa fa-info-circle'></i></span>";
JSNI:
private static native void initTooltip() /*-{
$wnd.$(document).ready(function(){
$wnd.jQuery("[rel=tooltipTop]").tooltip({ placement: 'top'});
});
}-*/;
I am Calling this JSNI after the table creation but still DOM is not ready.
Even i tried calling this JSNI Script in onAttach() Method,
@Override
protected void onAttach() {
super.onAttach();
initTooltip();
}
Any Suggestion?