# fontselect-jquery-plugin

> A jQuery font selector for Google Web Fonts

Latest version **1.1.0** (published 2019-03-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install fontselect-jquery-plugin
pnpm add fontselect-jquery-plugin
yarn add fontselect-jquery-plugin
bun add fontselect-jquery-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-03-02 |
| First published | 2017-10-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 32 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | seanvm |
| Maintainers | seanvm |
| Keywords | jquery-plugin, ecosystem:jquery |

## Links

- npm: https://www.npmjs.com/package/fontselect-jquery-plugin
- Repository: https://github.com/seanvm/fontselect-jquery-plugin
- Homepage: https://github.com/seanvm/fontselect-jquery-plugin#readme
- Issues: https://github.com/seanvm/fontselect-jquery-plugin/issues
- npm.io page: https://npm.io/package/fontselect-jquery-plugin

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2019-03-02
- 1.0.5 — 2018-04-10
- 1.0.3 — 2018-03-16
- 1.0.2 — 2018-01-27
- 1.0.1 — 2017-10-10
- 1.0.0 — 2017-10-08

## README

# Fontselect jQuery Plugin

A font selector to choose from fonts available as part of the Google Web Fonts api. 

Let users easily select and preview a font from Google's large range of free fonts.

# [Demo](https://seanvm.github.io/fontselect-jquery-plugin/)

## Documentation

To create a font selector simply run the plugin on a standard html input element.

### How to use

    $('input.fonts').fontselect();

### Options

Fontselect has one argument, an options object that you might want to customise:

* style: the class to give the new font selector
* placeholder: text to use when no font is selected yet
* lookahead: a number of fonts to try and preload ahead in the select box
* fonts: an array of fonts to display instead of the defaults.

      $('input.fonts').fontselect({
          style: 'font-select',
          placeholder: 'Select a font',
          lookahead: 2,
          fonts: ["Aclonica","Amaranth","Bevan","Zeyada"]
        });

### Events

Fontselect triggers the change event on the original element when a font is selected. 
An example is included to show how this could be used to update the font on the current page.

    $('input.fonts').fontselect().change(function(){
    
      // replace + signs with spaces for css
      var font = $(this).val().replace(/\+/g, ' ');
      
      // log font name
      console.log(font);
    });



## License / Credits

This is a continuation of the now-unmaintained [Fontselect jQuery plugin](https://github.com/tommoor/fontselect-jquery-plugin) by [Tom Moor](https://github.com/tommoor).

This plugin is released under the MIT license. It is simple and easy to understand and places almost no restrictions on what you can do with the code.
[More Information](http://en.wikipedia.org/wiki/MIT_License)


## Download

Releases are available for download from
[GitHub](https://github.com/seanvm/fontselect-jquery-plugin/releases).

Alternatively, you can download and install via NPM

`npm i fontselect-jquery-plugin` - https://www.npmjs.com/package/fontselect-jquery-plugin

---
_Source: https://npm.io/package/fontselect-jquery-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
