Reputation: 11
I added a hide button in my ajax editor control to hide the top toolbar using jquery. But the problem is, the control is common to all the pages, and wherever I have used more than one editor, the hide button hides toolbar of all the editors on that page. Can anyone suggest a way to prevent this? or any other idea to hide the toolbar of ajax editor? please help!
AjaxControlToolkit.HTMLEditor.ToolbarButton.MethodButton btnUp = new AjaxControlToolkit.HTMLEditor.ToolbarButton.MethodButton();
AjaxControlToolkit.HTMLEditor.ToolbarButton.MethodButton btnDown = new AjaxControlToolkit.HTMLEditor.ToolbarButton.MethodButton();
btnUp.NormalSrc = "../Images/Up.gif";
btnUp.Attributes.Add("onclick", "$('.ajax__htmleditor_editor_toptoolbar').hide(); this.hide();$('#" + btnDown.ClientID + ").show();");
btnUp.Style.Add("float", "right");
BottomToolbar.Buttons.Add(btnUp);
btnDown.NormalSrc = "../Images/down.gif";
btnDown.Attributes.Add("onclick", "$('.ajax__htmleditor_editor_toptoolbar').show(); this.hide();$('#" + btnUp.ClientID + ").show();");
btnDown.Style.Add("float", "right");
BottomToolbar.Buttons.Add(btnDown);
Upvotes: 0
Views: 129
Reputation: 2249
Probably you're using the css class
in order to trigger the JavaScript/jQuery function. You should add the id to the toolbar that you don't want to hide/show.
then use
$("#toolbarID").hide();
Please provide the code in order to get more specific solution.
Upvotes: 0