Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

jquery tooltip styling

Posted on 2013-05-15
1
Medium Priority
?
494 Views
Last Modified: 2013-05-15
Hi experts,

I have a basic asp.net page.

I'm using the jquery library and i'm using the jquery tooltip widget.

My page is called ToolTip2.aspx and this is the code:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ToolTip2.aspx.vb" Inherits="jqLibrary.ToolTip2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
<style type="text/css">

.TestText1 {font-family: Arial; color: #FF0000; font-size: 12px; font-weight: normal;}

</style>
    
    <%-- referening jquery library --%>
    <link rel="stylesheet" type="text/css" href="Scripts/jquery-ui.css" />

    <script language="javascript" type="text/javascript" src="Scripts/jquery-1.9.1.js"></script>
    <script language="javascript" type="text/javascript" src="Scripts/jquery-ui.js"></script>
    
    <%-- tooltip function --%>
    <script language="javascript" type="text/javascript">
        $(function () { $(document).tooltip(); });                 
    </script>
    
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
<p></p>
<br />
<br />
<br />
<br />
<br />
<p>
<a href="#" title="Anchor description">Anchor text</a>
<input type="text" title="Input help" />

    <asp:TextBox ID="TextBox1" runat="server" ToolTip="I am a asp TextBox"></asp:TextBox>
</p>
<table width="800" border="1">
  <tr> 
    <td>Column1</td>
    <td>Column2</td>
    <td>Column3</td>
    <td>Column4</td>
  </tr>
  <tr> 
    <td><span class="TestText1" title="This is some tooltip text on a table cell">R2C1</span></td>
    <td>R2C2</td>
    <td>R2C3</td>
    <td>R2C4</td>
  </tr>
</table>

    </div>
    </form>
</body>
</html>

Open in new window


When I run it, it looks like this:

my asp page

If you notice, when you hover over a textbox. The tooltip is white and shows up below the control I hover over.

How do I modify so the background color of the tooltip is yellow instead of white and instead of having the tooltip showing below the control I hover over, I want the tooltip to show up above the control I hover over.
0
Comment
Question by:maqskywalker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 39169834
$(function () { $(document).tooltip({
tooltipClass: "yourclass",
position: {
        my: "center bottom-50px",
        at: "center top"
    }
}); });    

<style>
.yourclass {
background:yellow
}
</style>
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question