Troubleshooting problems with tooltips when utilizing a custom arrow in jQuery UI

Utilizing the Tooltip custom style plugin presents a challenge for me...

My goal is to have my tooltip message appear like those seen on websites and in the image provided (for instance, incorporating an arrow into the tooltip):

  • Sample link
  • Sample link

Despite my attempts at applying various CSS rules, I am still unable to achieve the desired appearance... seeking assistance. Here is my CSS code:

body .ui-tooltip {
  border-width:0;
}

.ui-tooltip,.arrow:after {
  background:black;
  border:0 solid white;
}

.ui-tooltip {
  padding:10px;
  color:white;
  border-radius:5px;
  font-family:Verdana, sans-serif;
  font-size:12px;
  text-transform:none;
}

.arrow {
  width:70px;
  height:16px;
  position:absolute;
  left:0!important;
  margin-left:-25px;
  top:55%;
}

.arrow.top {
  top:-16px;
  bottom:auto;
}

.arrow.left {
  left:20%;
}

.arrow:after {
  content:"";
  position:absolute;
  left:20px;
  top:-20px;
  width:25px;
  height:25px;
  box-shadow:6px 5px 9px -9px black;
  -webkit-transform:rotate(45deg);
  -moz-transform:rotate(45deg);
  -ms-transform:rotate(45deg);
  -o-transform:rotate(45deg);
  tranform:rotate(45deg);
}

.arrow.top:after {
  bottom:-20px;
  top:auto;
}

.ui-tooltip {
  -ms-filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
  filter:alpha(opacity=70);
  opacity:0.7;
}

Upon implementing the aforementioned CSS code, my tooltip does not display as intended:

However, my objective is for it to resemble this, filling the entire space:

The issue lies with how my CSS handles the arrow design and does not match the example provided.

Edit:

The arrow problem has been resolved... yet achieving the desired display remains a challenge

.ui-tooltip {
  -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=70)";
  filter: alpha(opacity=70);
  opacity:0.7;
} 

I suspect they do not utilize the above CSS... any suggestions on how their transparency works would be appreciated

Answer â„–1

It seems like the arrow's placement is a bit off. Unfortunately, I can't provide you with exact values as I'm not able to test it myself. However, adjusting the width and left properties of the .arrow element should help achieve the desired outcome.

You can try the following CSS:

.arrow {
    width: 20px;
    height: 8px;
    position: absolute;
    top: 50%;
}

.arrow.left {
    left: -15px;
}

Answer â„–2

As of now, the jQuery UI Tooltip is facing an issue with defining arrows as connectors which are not yet functional in this plugin.

If you decide to insert your own connector markup for stylish arrows, be aware that the tooltip's position may vary depending on its location relative to the browser viewport, resulting in misplacement of the arrow.

It is recommended to use the jQuery qTip Plugin which offers arrows as connectors and automatically calculates the correct positioning.

For visual examples of different corner connectors available in the qTip plugin, check out HERE.

The photo above showcases the qTip tooltip positioned at the bottom left, indicated by the blue text, with the triangle shaped connector placed at the top right.

Answer â„–3

@Robinson Another option you have is to utilize the Bootstrap Tooltip feature, which offers a more user-friendly experience. By incorporating the CSS and JS files available for download from this link, you can easily implement this tool on your website.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

clicking on links to different sections of the page does not automatically bring you to the top of

I am working on a design similar to this: http://jsfiddle.net/MTWu5/ The layout consists of a centered page with a sticky header. The header contains menu links that lead to anchors within the page. My issue arises when clicking on these links - I would l ...

Tips for transferring Json data through Ajax in jquery for an html element?

I am facing an issue while trying to display data from 5 rows of a MySQL database in a table using the success function of a jQuery AJAX call. The data is returned in JSON format. Problem: I am able to retrieve only one row at a time, even though the cons ...

Adjusting the height of an element in AngularJS based on its width dynamically

I am working on a table that is generated using ng-repeat, and I want to ensure that each td in the tbody is square. Since all the tds have an equal width, I only need to adjust the first one. However, the size of the table and td will change when the wind ...

"Enhance Your Website with Interactive Image Popups and a Convenient

I obtained the Fancybox plugin from to utilize for opening my gallery images in a popup. Additionally, I implemented a fixed navigation feature when scrolling. The issue I am facing is that when I click on the images, they open in a popup window whi ...

Enhancing JavaScript form validation techniques

I am currently working on a user profile form that includes 15 text fields, dropdown menus, and a textarea. Users can input information into these fields, and upon saving the form, not all fields are required to be filled out. However, I need to validate a ...

Leveraging multiple ">" CSS selectors

Here is the HTML code to style: <table id="my-table"> <tr> <td> I would like to customize this </td> <td> <table> <tr> <td> Not looking to customize t ...

Having trouble finding rows to manipulate in an HTML table generated using jQuery csvToTable?

As a beginner in programming, I find myself seeking assistance with a particular issue. I have successfully read a CSV file stored locally and transformed it into an HTML table using jQuery csvToTable http://code.google.com/p/jquerycsvtotable/. Additional ...

I am encountering difficulties displaying the image and CSS files from another folder in my HTML with Node.js

I am facing difficulty in establishing a connection between my front-end and back-end using node.js. As a result, the website only displays the HTML code without linking to the CSS or image files. Here is the folder structure: root -src •pi ...

Leveraging Arrays with AJAX Promises

I am currently working on making multiple AJAX calls using promises. I want to combine the two responses, analyze them collectively, and then generate a final response. Here is my current approach: var responseData = []; for (var i=0; i<letsSayTwo; i++ ...

The changing of colors does not function properly when clicked in JavaScript

I am having an issue with a drop-down list that offers two options: blue and green. When I select blue and click on the text input field, its background color alternates between blue and black (the default text field color). The same applies when I choose ...

`How can you indicate a clicked linkbutton from a group of linkbuttons in asp.net?`

There is a single aspx page with a set of link buttons on it. Link Button 1 Link Button 2 Link Button 3 Link Button 4 Link Button 5 When any of the link buttons are clicked, they should be highlighted. All these link buttons are contained within a table ...

Issue with Bootstrap modal not displaying in the center as expected

screenshot of the page Hey there, I'm struggling to understand why this modal is displaying incorrectly. I copied the code from the bootstrap website. Here it is: <button type="button" class="btn btn-info btn-lg" (click)="showPerformedActivityMod ...

designing a navigation menu - aligning two list items side by side

Struggling to create a navigation bar with multiple li elements positioned next to each other? I've been trying to figure it out but can't seem to get it right. Anyone know of a tutorial or solution for this? Spent days working on it... CSS code ...

How to use jQuery to update a text input field based on a selected <select> dropdown option

Hi there, I could really use some help with this issue... Here's the problem - I need to change the value of a textbox within a table based on the selection of an option in a dropdown. Here's a simplified version of what I mean: <select id= ...

What is the best method to utilize a jQuery selector on an expando property that works across different web browsers?

Having some trouble with my ASP.NET page and jQuery selectors. I need to match validation controls connected to specific textboxes, but the selectors aren't working consistently across different browsers. Here's a test example: <html xmlns="h ...

Substitute Ajax.ActionLink with a different method

Hey there, I have an Ajax Action Link set up that is working perfectly fine. It displays some text from a partial view when the link is clicked. However, I want this text to be shown automatically when the page loads, without the need to click on the actio ...

Show the respective value names stored in my database for every choice available

I am facing a challenge in explaining what I need, but essentially, I want to showcase the name of the choice I selected from a list stored in the database. To provide more context, below is my select input: <select name="options[1][]" id="perso_1" cl ...

Selecting specific elements based on their position within a parent element using

I can't seem to figure out the strange behavior of the nth-child selector. After calling the function BackColor1(), my visual appears different than expected: Something seems off. However, when I call BackColor2(), everything looks normal again. Co ...

Tips for properly halting an AJAX request

My challenge is to halt an Ajax request when a user clicks a button. Despite using .abort(), the Ajax request continues to occur every 2 seconds. Essentially, the user waits for a response from the server. If the response is 2, then an Ajax request should ...

Align the content vertically in two adjacent divs

I have a logo and a menu in two separate divs side by side. The logo is on the left and the menu is on the right. I am trying to vertically align the menu in the right div with the logo in the left div. Here is the code snippet: <div id="header"&g ...