Giter Club home page Giter Club logo

fontawesome-selector's Introduction

WARNING: Do not use on a production site. Wait for a stable release.

FontAwesome-Selector

Vanilla JS Font Awesome icon selector widget with zero dependancies, easy installation & cross browser support.

Check out the live demo here

Installation

  1. First, make sure you have FontAwesome installed. I recommend using the latest version of FontAwesome in order to ensure all icons show up properly.

  2. Clone or download this repository.

  3. Link to the FASelector CSS at the top of your HTML file.
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/XigeTime/FontAwesome-Selector/cdn/vUNSTABLE/faSelectorStyle.min">

  4. Link to the FASelector JS just before the closing body tag in your HTML file.
    <script src="https://cdn.jsdelivr.net/gh/XigeTime/FontAwesome-Selector/cdn/vUNSTABLE/faSelectorWidget-vUNSTABLE.min"></script>

  5. You will now be able to add your FASelectorWidget anywhere in your HTML file by using the onclick and ID attributes. (Note, the widget element must be nestable. A, SPAN, DIV etc.. work for all browsers, some elements like BUTTON, don't work in firefox.)
    onclick="openFaSelector(this,event)" id="fa-selector"

Example Element:
<span onclick="openFaSelector(this,event)" id="fa-selector">My Button</span>

Change Selector Theme

You can change the selector theme by adding the "data-theme" tag.
data-theme="modern"

Supported Browsers (Latest)

  • Google Chrome
  • Mozilla Firefox
  • Opera
  • Microsoft Edge
  • Internet Explorer
  • Safari

fontawesome-selector's People

Contributors

xigetime avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fontawesome-selector's Issues

error on icon click

Hi!

have an error in Chrome ( v. 83.0.4103.97, (64-bit)), on double-click. When opened demo page with Live Server in VS:

VM77:62 Uncaught TypeError: (event.target.className || "").indexOf is not a function
at onDoubleClick (eval at success (kernel.js:210), :62:48)
at dispatch (jquery.js:5237)
at elemData.handle (jquery.js:5044)

Also there is no text in select field, when single-clicked. Not sure how it should work..
err-2-2020-06-15_160334

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.