victor-valencia / bootstrap-iconpicker

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

Initializes an iconpicker with options not working #92

Open patel33hardik opened 4 years ago

patel33hardik commented 4 years ago

Thanks for the bootstrap-iconpicker. Following code is not working on the page, while methods work fine. $('#IconPicker').iconpicker({ cols: 5, rows: 3, footer: false, header: false, iconset: { iconClass: 'fontawesome', iconClassFix: 'fa-', icons: [ 'bolt', 'bullseye', 'ambulance', 'bell' ]}, placement: 'bottom', search: false, });

following code is work $('#IconPicker, #SelectIcon').iconpicker() .iconpicker('setCols', 5) .iconpicker('setRows', 3) .iconpicker('setFooter', false) .iconpicker('setHeader', false) .iconpicker('setIconset', { icons: [ 'empty', 'fas fa-fire', 'fab fa-gripfire', 'fas fa-bell', 'far fa-bell', 'fas fa-exclamation', 'fas fa-exclamation-triangle', 'fas fa-ambulance', 'fas fa-bullhorn', 'fas fa-bullseye', 'fas fa-broadcast-tower', 'fas fa-bolt', 'fas fa-phone-volume', 'fas fa-power-off', 'fab fa-itunes-note' ] }) .iconpicker('setIcon', 'empty') .iconpicker('setPlacement', 'bottom') .iconpicker('setSearch', false)