Giter VIP home page Giter VIP logo

jquery.inputfit.js's Introduction

#jquery.inputfit.js Plugin that makes value of the input fit into the input, see the demo

Requires

  • jquery 1.4.4 or higher

Default options

minSize : 12
maxSize : 24

Using:

<input type="text" name="younameit" id="input">
<script type="text/javascript">
    $('input').inputfit();
</script>

Plugin fits text by changing the font-size, so you should set min and max font-size values. Oh, and it relies on id of the element. It doesn't have to be called by id, but it should have it anyway.

Note

I just needed this functionality for our company's project, it works alright with some potential tweaking in all browsers (IE6+, CHR, SAF, FF3+, O10+ etc.). Please, file an issue if something is broken, I promise I'll look in to it)

TODO:

  • refactor "id" dependency
  • fix jumps in some cases
  • fix all hardcode :(

jquery.inputfit.js's People

Contributors

vxsx avatar robindaugherty avatar

Watchers

Caio D'Angelo avatar James Cloos avatar

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.