victor-valencia / bootstrap-iconpicker

A simple icon picker
https://victor-valencia.github.com/bootstrap-iconpicker/
MIT License
377 stars 140 forks source link

Not working with Webpack #47

Open rodrigoreyes79 opened 8 years ago

rodrigoreyes79 commented 8 years ago

Hi. I am trying to make the iconpicker to work with webpack but seems like it does not. Here is the code I am using:

require('../node_modules/bootstrap-iconpicker/bootstrap-iconpicker/css/bootstrap-iconpicker.min.css');
require("imports?jQuery=jquery!../node_modules/bootstrap-iconpicker/bootstrap-iconpicker/js/iconset/iconset-glyphicon.min.js")
require('imports?jQuery=jquery!../node_modules/bootstrap-iconpicker/bootstrap-iconpicker/js/bootstrap-iconpicker.min.js');

... 

$('.btn-iconpicker').iconpicker();

I am getting the following error when clicking on the buttons:

bootstrap-iconpicker.min.js:22 Uncaught TypeError: $this.popover is not a function
bootstrap-iconpicker.min.js:22 Uncaught TypeError: $(...).popover is not a function
lewma commented 7 years ago

I get the same errors. Any ideas ?

victor-valencia commented 6 years ago

Hi @rodrigoreyes79 and @lewma

You need include the jquery and bootstrap libraries.

https://cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js