Integrate Simple Fontawesome Icon Picker using fontawesome-iconpicker jQuery Plugin
Few days back i shared tutorial about how to integrate bootstrap icon picker on website, Today I am going to share a simple jQuery plugin to add fontawesome icon picker on your website. As we know fontawesome is very popular library for icons you must have use this library on many of your projects. But if you want to dynamical add fontawesome icon with any menu, tabs or any other dynamic stuff which required fonts then you can use this cool icon picker plugin.
Integrate Simple Fontawesome Icon Picker
Libraries
Include all the required libraries on page like jQuery, bootstrap, fontawesome and plugin’s library
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <link href="https://use.fontawesome.com/releases/v5.0.8/css/all.css" rel="stylesheet"> <link href="fontawesome-iconpicker.min.css" rel="stylesheet"> <script src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous">script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous">script> <script src="fontawesome-iconpicker.min.js">script> |
HTML
Create an sample input fields for the fontawesome icon picker.
JS
Now use following one line of javascript to activate default fontawesome icon picker on input fields.
$(function() { $('.icon-picker').iconpicker(); }); |
Here is the list of options you can use in above function to customize your fontawesome iconpicker.
‘,
footer: ”,
buttons: ‘‘ +
‘ ‘,
search: ‘‘,
iconpicker: ”,
iconpickerItem: ‘‘
});
});
See live demo and download source code.
Visit official github repository for more information and follow for future updates. Don’t forget to read license for using this plugin in your projects.