jQuery Plugin To Scale Web Content Based On Specific Width Smartzoom - Download jQuery Plugin To Scale Web Content Based On Specific Width - Smartzoom

Download jQuery Plugin To Scale Web Content Based On Specific Width – Smartzoom

Posted on

This time I will share jQuery Plugin and tutorial about jQuery Plugin To Scale Web Content Based On Specific Width – Smartzoom, hope it will help you in programming stack.

jQuery Plugin To Scale Web Content Based On Specific Width Smartzoom - Download jQuery Plugin To Scale Web Content Based On Specific Width - Smartzoom
File Size: 9.02 KB
Views Total: 818
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   



Smartzoom is a tiny jQuery plugin that automatically scales the web content based on the screen width you defined. Great for responsive and cross-platform webpage for better readability in mobile view.

Basic usage:

1. Add the following <meta> viewport element in all your web pages.

1 <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no">

2. Set the base font size for your web content.

01 body {
02   font-size: 100%;
03 }
04  
05 h1 {
06   font-size: 3em;
07 }
08  
09 p {
10   font-size: 2em;
11 }

3. Add the jQuery Smartzoom plugin after you’ve added jQuery JavaScript library.

1 <script src="//code.jquery.com/jquery-1.12.0.min.js"></script>
2 <script src="jquery.ap-smartzoom.min.js"></script>

4. Define the breakpoint to trigger the plugin and set the font size you want to use.

1 ap.smartzoom.initialize({
2  
3   // 100%
4   fontSize: 100,
5  
6   // 640px
7   width:    640
8    
9 });

Change log:

2016-02-17


This awesome jQuery plugin is developed by allianceport. For more Advanced Usages, please check the demo page or visit the official website.




source : jqueryscript.net