Giter Site home page Giter Site logo

viewportdesign / dynamicfontsize.js Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 140 KB

JQuery Script to resize DOM Elements with font-sizes in px. This will dynamically resize on window resizing, similar to vw,vh, but pure JS solution. Feel free to Use, Share and Modify.

JavaScript 100.00%

dynamicfontsize.js's Introduction

dynamicFontSize.js

This JQuery Script enables you to simulate the vw, vh Behaviour to Font-Size defined in px, that way it will use pure Javascript and therefore you'll be able to use it in older versions of IE or some devices which don't support CSS3 completely yet. Just set a baseWidth Parameter in the Script (to the page width you like your font sizes in px). Then in document.ready Function call DynamicFontSize.init(), this will automatically set Event Handlers for resizing. You'll also need to include Jquery. You can also set a min-font-size and max-font-size in the scripts first lines. I hope you like it.

dynamicfontsize.js's People

Contributors

viewportdesign avatar

Stargazers

 avatar

Watchers

 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.