javascript - Is It possible to show tooltip on dropdown in asp.net -


in web application, have dropdowncheckboxes control trying show tooltip on selectbox items. is possible do.

i tried code:

.aspx:

<%@ register namespace="saplin.controls" assembly="dropdowncheckboxes" tagprefix="asp"  %>      <link rel="stylesheet" href="css/bootstrap-3.1.1.min.css" type="text/css" />      <link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet" />      <script src="https://code.jquery.com/jquery-1.10.2.js"></script>      <script src="https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>       script tag       <script>              $(function () {                  $("#tooltip1").tooltip();              });           </script>          <div class="tooltip1"> <asp:dropdowncheckboxes id="dropdown1" runat="server" useselectallnode="true" usebuttons="true" onselectedindexchanged="dropdown1_selectedindexchanged"                                 autopostback="true"> <style selectboxwidth="200" dropdownboxboxwidth="200" dropdownboxboxheight="130" />                         <texts selectboxcaption="" />                                                    </asp:dropdowncheckboxes> <asp:label runat="server" id="tooltip1"></asp:label> 

.cs:

protected void page_load(object sender, eventargs e)         {             tooltip1.text = dropdown1.texts.selectboxcaption; }  protected void dropdown1_selectedindexchanged(object sender, eventargs e)         {              list<string> checkedlist = new list<string>();             foreach (listitem item in dropdown1.items)             {                 if (item.selected)                 {                     checkedlist.add(item.value);                 }              }                         dropdown1.texts.selectboxcaption = string.join(",", checkedlist.toarray()); } 

tooltip not displayed can tell me did mistake don't know. there events display tooltip

image description here

thank you

following method working adding tooltip lists

public static void bindtooltip(listcontrol lc)     {         (int = 0; < lc.items.count; i++)         {             lc.items[i].attributes.add("title", lc.items[i].text);         }     } 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -