popper.js

Bootstrap CSS breaks tooltip popover

流过昼夜 提交于 2019-12-11 10:14:48
问题 The event tooltip event render works fine until i add a bootstrap css Working site https://fullcalendar.io/docs/event-tooltip-demo When i add the following to the css https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css It breaks the tootips from being displayed. Here is the same demo on codepen with the css added to it https://codepen.io/ryan-ramsumair/pen/GLGpwQ?editors=0110 How can i remedy this ? 回答1: Changing : eventRender: function(info) { var tooltip = new

Angular 6 + Popper.js (without jQuery)

家住魔仙堡 提交于 2019-12-10 18:03:53
问题 I am trying to setup Popper.js to work with angular 5, without bootstrap or jquery. I tried following this https://github.com/FezVrasta/popper.js/#react-vuejs-angular-angularjs-emberjs-etc-integration, but it is not exactly a point A to B description for angular applications. I installed Popper.js via npm npm install popper.js --save then I chose to bundle the esm module to my angular-cli scripts "scripts": [ (...) "../node_modules/popper.js/dist/esm/popper.js" ], Since esm/popper.js exports

Not able to install bootstrap 4 (beta) nuget package to .Net MVC (.Net version 4.6.2)

大憨熊 提交于 2019-12-09 14:27:24
问题 I am not able to install bootstrap 4(beta) to my MVC project. To be precise popper.js nuget dependency is failing to install. Please let me know any possible way to do it(bower install is still a way but I want to go with nuget) Could not install package 'popper.js 1.11.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more

How to show the arrow in popper-js

风格不统一 提交于 2019-12-07 10:55:43
问题 I'm trying to use popper-js, but I have a hard time reading the documentation and to get things working. I can't seem to get the arrow to show (the triangle thingy pointing to the referenceElement). The code below is narrowed down to what I'm trying to do. The popper is shown and positioned on content load. But how to configure the popper? (And also things like the offset to the subject). <!DOCTYPE html> <html> <head> <style> h1 { text-align:center;} #info_box { border:1px solid black;

Mock 3rd party library constructor with jest

末鹿安然 提交于 2019-12-05 23:07:58
I'm writing unit tests with jest and I have to test a function that is calling a constructor from a 3rd party library (the goal of the test is to check that the call is made with good arguments The 3rd patry library is Popper.js I have made a jest.spyOn(Popper.prototype, 'constructor').mockImplementation( () => {}) but it is throwing error that came from the inside of the constructor (thus it is not the mock function that has been called) Here is the code of my test import Popper from 'popper.js'; it('should call Popper constructor with correct argument', () => { // Arrange jest

tooltip.js popper.js usage example

本小妞迷上赌 提交于 2019-12-05 15:41:34
As not very proficient in javascript I don't understand the tooltip.js documentation at all. Why do the not include an example for people like me? Ho do I have to install this library in order to work correctly? I add tooltip.js to webpack (installed via npm) Then I do import tooltip from 'tooltip.js'; Then what? I tried to use the code from boostrap : <p data-toggle="tooltip" data-placement="top" title="Tooltip on top"> Tooltip on top </p> $(function () { $('[data-toggle="tooltip"]').tooltip() }) But I don't actually use bootstrap so the error is: TypeError: $(...).tooltip is not a function

Bootstrap 4 Navbar doesnt collapse in Angular4

北城余情 提交于 2019-12-04 02:13:22
问题 I'm working with Bootstrap 4 and Ng-Bootstrap in an Angular 4 Project, i have linked the que bootstrap.css in my angular-cli.json this way "styles": [ "../node_modules/bootstrap/dist/css/bootstrap.css", "styles.css" ], and imported the NgbModule in my app.module that looks like this import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { AppComponent } from './app.component';

Not able to install bootstrap 4 (beta) nuget package to .Net MVC (.Net version 4.6.2)

放肆的年华 提交于 2019-12-03 23:57:22
I am not able to install bootstrap 4(beta) to my MVC project. To be precise popper.js nuget dependency is failing to install. Please let me know any possible way to do it(bower install is still a way but I want to go with nuget) Could not install package 'popper.js 1.11.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.6.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author I was finally able to get Bootstrap 4-Beta working by doing

Force Bootstrap dropdown menu to always display at the bottom and allow it go offscreen

好久不见. 提交于 2019-12-03 19:25:08
问题 When there is no room at the bottom of the viewport to fit dropdown menu, it is displayed at the top of its dropdown button. Is it possible alter this behavior and make dropdown always appear at the bottom? <div class="dropdown"> <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> Dropdown button </button> <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <a class="dropdown

Bootstrap 4 popper is undefined

空扰寡人 提交于 2019-12-02 09:37:46
问题 I'm trying to get a dropdown going and whenever I click on the button I get TypeError: popper is undefined . I tried importing the bundle instead of bootstrap // import "bootstrap"; import 'bootstrap/dist/js/bootstrap.bundle.js'; I tried importing jquery first import "jquery"; import "bootstrap"; I tried importing popper as well import "popper.js/dist/umd/popper.min.js"; import "jquery"; import "bootstrap"; I also tried including popper from a CDN before any other scripts <script src="https:/