私はツールチップを持つImageButtonを持っています。ボタンをクリックすると、ツールチップは表示されたままになり、ページ上のマウスに固執します。私はボタンがクリックされているが、これを行う方法を見つけることができない、ツールヒントが消えるようにしたい。画像のボタンをクリックするとツールチップが表示されます
アドバイスをいただければ幸いです! マークアップ:
<asp:TemplateField HeaderText="Mark as Read">
<ItemTemplate>
<asp:ImageButton ID="img_markAsRead" runat="server" ImageUrl="img/icons/eye.png" CssClass="tooltip" Width="20" ToolTip="Mark this Notification as Read" CommandName="Edit" CommandArgument='<%# Eval("notification_id")%>'/>
</ItemTemplate>
</asp:TemplateField>
CSS:背後
.ui-tooltip {
padding: 8px;
position: absolute;
z-index: 9999;
max-width: 300px;
-webkit-box-shadow: 0 0 5px #aaa;
box-shadow: 0 0 5px #aaa;
}
は、コード:あなたのjQueryのタグとクラス名が「UIであるという事実に基づいて
protected void grdv_RowEditing(object sender, GridViewEditEventArgs e)
{
GridViewRow theRow = grdv_notifications.Rows[e.NewEditIndex];
ImageButton theButton = (ImageButton)theRow.FindControl("img_markAsRead");
string notificationNo = theButton.CommandArgument;
#region the clever sql statement to do the updates
#endregion
//reload the gridview
loadGridview();
//set the notification number
MasterPage master = (MasterPage)this.Master;
master.updateNotificationCount(grdv_notifications.Rows.Count);
}
ありがとうございますが、これは機能しませんでした。このコードを追加した後、画像をクリックしてもツールチップが表示されます。 – akb29
私たちが見ることのできるデモはありますか? –
申し訳ありません私はこのすべてで初心者です - デモを見せるにはどうすればいいですか? – akb29