Positioning elements using Tether in Bootstrap 4

Is it possible to extend Bootstrap 4, which currently uses tether.js for positions that only support "top", "right", "bottom", and "left", to include more options? Tether supports a total of 12 position options like "top left" or "top right". How can this be achieved?

Answer №1

It appears that the bootstrap framework only allows for the use of 4 placement options. You can reference the ongoing discussion on this matter in the github issue.

Currently, bootstrap has limited support with only 4 placement options, whereas tether offers 12.

Therefore, if you encounter limitations with bootstrap tooltips, consider utilizing tether.js or its counterpart tooltip.js.

For example, you can implement tooltip.js as shown below:

new Tooltip({
  target: document.getElementById('foobar'),
  position: 'right middle',
  content: '<div id="foo">bar</div>',
});
#foo{
  background-color: black;
  color: red;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/tether-tooltip/1.2.0/css/tooltip-theme-arrows.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.3.2/js/tether.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether-drop/1.4.2/js/drop.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether-tooltip/1.2.0/js/tooltip.min.js"></script>

<a href=# id="foobar">I'm a link!</a>

You can also access the fiddle link here.

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

Response from the controller upon choosing a value from the selection dropdown

Scenario: In this scenario, there are two tables in consideration: Firm table : ID (string), Firm(string) Firms table: FirmID(string FK), Name(string) The goal is to select a value from the Firm table, pass it to the controller as Firm, and then execut ...

AngularJS is restricting the use of square brackets within the URL parameter, specifically the character '[.'

My goal is to connect to an external API Everything works smoothly when my parameters are set up like this $http.post('http://api.myprivatebox.com/users.json', { email : email, password : password}).then(function (results) { console.log( ...

Retrieving Docker logs from MongoDB for analysis

Storing logs from Docker into MongoDB using Fluentd has been a fairly simple setup. However, my current struggle lies in retrieving these logs in the correct order while also implementing pagination. The structure of a log document typically looks like th ...

Angular ng-repeat not populating the list properly, causing a collapse not to display

Currently, I am working on developing an app using Angular.js and Bootstrap UI, but I have run into a problem with a collapse navigation feature. The issue I am facing is that I have an ng-repeat that should be functioning properly. However, when I click ...

What steps should I take to resolve the "You do not have authorization to access this directory or page" error in Azure App Services?

Currently, I am attempting to deploy my Next.js 13 application to AppServices using Github Actions. The compilation process on Github was successful, however, I am encountering an issue where my application does not seem to be deploying or starting up prop ...

Guide on creating a repeating displacement map in three.js

When working with a three.js rendering, I have a small texture that I need to repeat multiple times. This texture includes various maps such as the map itself, a displacement map, a normal map, an ambient occlusion map, and a specular map. Everything looks ...

Angular - Automatically hide sidebar menu upon selecting a menu item

Struggling to hide a sidebar menu after clicking on a menu item that you created? I ran into the same issue and tried following the example from a tutorial on Do I really need to call toggleMenu on (click) of every hyperlink in the HTML? If so, how do I i ...

When it comes to assigning a background to a div using jQuery and JSON

I have been experimenting with creating a database using only JSON and surprisingly, it worked once I added a "js/" in the URL. However, my current issue lies with CSS. Let me elaborate. Here is the JSON data: [ { "title":"Facebook", ...

Having trouble with setting the date in Firefox 57 using Selenium 3.4?

Date Field Image Having trouble setting date information beyond the specified date field using the sendKeys function. Attempted to use JavaScript but unable to successfully set the value. Update: HTML driver.findElementBy("//label[text()='Past Spe ...

A error was encountered stating that the formValidation function is not defined when the HTML form element is submitted

Having trouble calling a function and receiving an error message. How can I resolve this issue? The error message reads: index.html?email=&gebruikersnaam=&wachtwoord=&submit=Submit:1 Uncaught ReferenceError: formValidation is not defined at HT ...

Trying to extract data from the ASX website's table using web scraping techniques

My goal is to extract the current stock value from the ASX.com.au website. Specifically, I am interested in retrieving the current ASX value, which can be located here. The value I am looking for is in the second td from the left, currently standing at 30 ...

AngularJS: Users must click submit button twice for it to function properly

It's puzzling that I have to click the submit button on my form twice before it triggers the save function below. My HTML is written in Pug format. Below is a snippet of my HTML template: <form ng-submit="save()"> <div class="form-group" ...

Guide on updating a key's value in an object

Hello, I am a newcomer to working with react redux. Currently, I have an array of objects structured like this: let result = [ {Id :'a',temp:5,data:'abc (c:1'},{Id :'a',temp:5,data:'pqr (c:1'}{Id :'a',temp ...

What causes the first button to be clicked and the form to be submitted when the enter key is pressed within a text

Start by opening the javascript console, then place your cursor in the text box and hit enter. What is the reason for the function "baz" being called? How can this behavior be prevented? function foo() { console.log('foo'); } function bar() ...

Intelligent Scrolling with Bootstrap 4

Utilizing a basic tutorial from here to implement show/hide functionality for a standard BS4 navbar on scroll. Works flawlessly on desktop. However, facing an issue with the mobile view where the navbar behaves oddly when scrolling down and returning to t ...

Exploring Vue Routing with Regular Expressions

Recently, I integrated a route with a parameter in my Vue project. const routes = [ { path: "/:lang(^$|^es$|^pt$|^cn$)", name: "Home", component: Page, }, { path: "/privacy", name: "Privacy", component: Privacy, }, { ...

Adjust the aesthetic based on whether the field is populated or empty

I have a simple text field on my website that triggers a search when the user inputs a value. I am wondering if it is possible to style the text field differently depending on whether it is empty or has content. Specifically, I want to change the border c ...

Authentication Error (401) in WordPress JWT

Recently, I came across WordPress and started using it. However, I encountered some issues while trying to integrate JWT with a custom endpoint. Despite configuring my API and JWT correctly, I faced an authentication problem during my AJAX request. It&ap ...

What is the best way to require users to click one of the toggle buttons in a form?

Is it possible to require the user to click one of the toggle buttons in a React form? I want to display an error if the user tries to submit the form without selecting a button. Even though I tried using "required" in the form, it didn't work as expe ...

Accessing a Variable in one JavaScript File from Another JavaScript File

In the process of creating a basic game using only JavaScript and jQuery, I have split it into two separate pages. The first page contains all the rules and necessary information, while the second page is where the actual game takes place. My goal is to in ...