tito433 / Bootstrap-icon-picker

Icon picker for Bootstrap 3 like a datepicker
78 stars 30 forks source link

Cool idea and project! - May I dare to ask for ... #2

Open pepperstreet opened 10 years ago

pepperstreet commented 10 years ago

May I dare to ask for a FontAwesome version? Or does anybody know of a similar tool and project?

Don't get me wrong, I really appreciate your work on this! But it turns out that many people tend to use FontAwesome.

best regards, Maik

pepperstreet commented 10 years ago

Searching before asking ;-) If anybody else is interested…

BS3 FA4 - bootstrap icon picker by @victor-valencia https://github.com/victor-valencia/bootstrap-iconpicker

BS2 FA3 - Simple Icon Chooser by @scripting https://github.com/scripting/Icon-Chooser

langell commented 10 years ago

Can you tell me if I can set this on a dynamically loaded html element? I am creating the input dynamically and I want to attach the iconPicker to the dynamically created html element.

tito433 commented 10 years ago

@langell yes you can. If you are creating element on a button click then call the attach function right after adding your element on page. Just like adding rich editor to a dynamically added input field.

tito433 commented 7 years ago

@langell, I'm very disappointed to reply you 2.5 years latter, I wish I could do earlier. It took lot of time to understand JS for me. First of all this a Plugin that add a function to jQuery library. You've to include it in your application otherwise you can't have this features. This library completely relays on JQuery libray. Which i can decouple now.

As some point in JS you've successfully created a input element and attached it to desired parent node like this:


var $input=$('<input>').attr('type','input').appendTo('body');

//attach iconPicker to $input
$input.iconPicker();
``