Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Access attributes of asp.net controls from JQuery
- <asp:TextBox CssClass="myclass" ID="Name" runat="server" ToolTip="some tooltip">/asp:TextBox>
- $(document).ready(function() {
- $('.myclass').click(function() {
- alert($(this).attr('ToolTip'));
- });
- });
- alert($(this).attr("title"));
- $(function () {
- $('.mybutton').onclick(function () {
- var tooltip = "B";
- $('.mytb').attr('title', tooltip);
- });
- });
- <button type="button" CssClass="mybutton">Click Me!</button>
- <asp:TextBox ID="TextBox1" runat="server" ToolTip="A" CssClass="mytb"></asp:TextBox>
Add Comment
Please, Sign In to add comment