PDA

View Full Version : [CLOSED] Unable to hide tooltip in javascript



alscg
Oct 31, 2013, 8:00 AM
Hi,

I am using tooltip for fileupload field.


Html.X().FileUploadField().ID("file1").ButtonMargin(-2).Padding(5).FieldLabel(" ")
.FieldCls("textField-fileupload").Width(200).Disabled((@Model.FileName1 != null)),

Html.X().ToolTip().ID("tip1").Target("file1").Html(@Model.FileName1).Hidden((@Model.FileName1 == null))


I need to hide that tooltip in javascript at certain condition.

I have tried following solution but not succeeded.


App.tip1.body.dom.innerHTML = "No file is attached.";
App.tip1.setTarget("");
App.tip1.hide();


Please guide me how to hide tooltip or how to remove target of tooltip in java script so that user will not see any tool tip or even blank text in tool tip.

Thanks

Daniil
Oct 31, 2013, 8:20 AM
Hi @alscg,

I can suggest the following solution.

var beforeShow = function () {
return false;
};

App.ToolTip1.on("beforeshow", beforeShow);


To enable it again:

App.ToolTip1.un("beforeshow", beforeShow);