When I hover over my a
element, only a simple tooltip appears without any styling, unlike what is shown in the Bootstrap documentation. (I am creating the a
element using JavaScript)
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--BOOTSTRAP-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons/font/bootstrap-icons.css">
<!--GOOGLE FONTS-->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Ranchers&display=swap" rel="stylesheet">
<!--CUSTOM STYLESHEET-->
<link rel="stylesheet" href="../CSS/homePage.css">
<title>App</title>
</head>
<body>
<div class = "btndiv">
<!--DIV FOR STORING ANCHOR TAG-->
</div>
<!--JQUERY-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!--BOOTSTRAP-->
<script src="https://cdn.jsdelivr.net/npm/bootstrap/dist/js/bootstrap.bundle.min.js"
integrity="sha384-b5kHyXgcpbZJO/tY9Ul7kGkf1S0CWuKcCD38l8YkeH8z8QjE0GmW1gYU5S9FOnJ0"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popperjs/dist/umd/popper.min.js"
integrity="sha384-KsvD1yqQ1/1+IA7gi3P0tyJcT3vR+NdBTt13hSJ2lnve8agRGXTTyNaBYmCR/Nwi"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap/dist/js/bootstrap.min.js"
integrity="sha384-nsg8ua9HAw1y0W1btsyWgBklPnCUAFLuTMS2G72MMONqmOymq585AcH49TLBQObG"
crossorigin="anonymous"></script>
<script>
$(document).ready(function () {
$('[data-toggle="tooltip"]').tooltip({ 'placement': 'bottom' });
});
</script>
<script src="../JAVASCRIPT/homePage.js"></script>
MY JS -
const btn1 = document.createElement('a');
btn1.innerHTML = 'DELETE';
btn1.setAttribute('data-bs-toggle', 'tooltip');
btn1.setAttribute('data-bs-placement', 'bottom');
btn1.setAttribute('title', 'Delete');
btn1.href = '#';
btndiv.append(btn1);