Popover
How do I make an popover?
What is a popover? How do you make a popover? This script and codes were developed by Jota Teles on 03 September 2022, Saturday.
Popover - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Popover</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div ng-app="pen"> <popovers></popovers>
<div class="popover"> <div class="popover-conteudo">lindo texto sobre gatos</div>
</div>
<h1 class="texto-qualquer"> Nós gatos já nascemos pobres, porem já nascemos livres!</h1>
<button class="gatilho-da-popover">Miau</button>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Popover - Script Codes CSS Codes
html { padding: 30px 30px; min-height: 1200px;
}
.texto-qualquer { min-height: 150px;
}
.gatilho-da-popover { margin-left: 300px;
}
.popover { background-color: #666; position: absolute;
}
Popover - Script Codes JS Codes
angular.module("pen", ["popover"]);
angular.module("popover", []);
angular.module("popover").directive("popovers", PopoversDirective);
angular.module("popover").factory("PopoversModel", PopoversModel);
function PopoversModel(){ var model = { }; return model;
}
function PopoversDirective(){ var directive = { restrict: "AE", scope: {}, template: "", controller: function(){ var vc = this; }, controllerAs: "vc", bindToController: true, }; return directive;
}
var popoverElement = document.querySelector(".popover");
var gatilhoElement = document.querySelector(".gatilho-da-popover");
var mapaPosicoes = new function(){ this.gatilhoY = gatilhoElement.offsetTop; this.gatilhoX = gatilhoElement.offsetLeft; this.gatilhoLargura = gatilhoElement.clientWidth; this.gatilhoAltura = gatilhoElement.clientHeight; this.popoverLargura = popoverElement.clientWidth; this.popoverAltura = popoverElement.clientHeight; this.espacamento = 10; this.gatilhoCentroX = this.gatilhoX + (this.gatilhoLargura / 2); this.popoverX = this.gatilhoCentroX - (this.popoverLargura / 2); this.popoverY = this.gatilhoY - (this.popoverAltura + this.espacamento);
};
popoverElement.style.left = mapaPosicoes.popoverX + "px";
popoverElement.style.top = mapaPosicoes.popoverY + "px";
Developer | Jota Teles |
Username | teles |
Uploaded | September 03, 2022 |
Rating | 3 |
Size | 2,248 Kb |
Views | 32,384 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Nes palette components | 3,850 Kb |
Angular link builder | 2,186 Kb |
Link Builder Examples | 2,948 Kb |
ArrayMixer | 3,053 Kb |
ArrayMixer Playground | 3,677 Kb |
Infinite chocolate bar | 4,634 Kb |
Parallel park - pure css | 8,404 Kb |
Markpad | 2,015 Kb |
VD Modal Sample | 2,498 Kb |
A Pen by Jota Teles | 2,972 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
A Pen by Jim Savage | Madebyjam | 2,418 Kb |
Material design buttons | Fischaela | 4,381 Kb |
Isometric css island | Xaddict | 2,950 Kb |
Scifi-style Radio-based Tab | Aaronchuo | 4,427 Kb |
ABVI Menu Discarded | Overdrivemachines | 3,607 Kb |
SVG Transform vs CSS Transform | AmeliaBR | 4,175 Kb |
Comparison of Roboto Draft vs Roboto | Jxnblk | 2,880 Kb |
Nested flexbox layout for library catalog | Boycetrus | 3,271 Kb |
Nice textured background | Hans | 2,659 Kb |
Flat UI - Checkbox FIX | ARS | 2,663 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!