Enlarge text with buttons and js, with limited max- and min sizes
How do I make an enlarge text with buttons and js, with limited max- and min sizes?
What is a enlarge text with buttons and js, with limited max- and min sizes? How do you make a enlarge text with buttons and js, with limited max- and min sizes? This script and codes were developed by Eduard Mayer on 13 July 2022, Wednesday.
Enlarge text with buttons and js, with limited max- and min sizes - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Enlarge text with buttons and js, with limited max- and min sizes</title>
</head>
<body> <button class="text-gr">Bigger</button>
<button class="text-kl">Smaller</button>
<p class="ticker">Current font size: 1em</p>
<p class="target">Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quaerat error cumque perferendis. Delectus necessitatibus laboriosam dignissimos et quos consequuntur velit explicabo totam deserunt officia animi fuga ex praesentium culpa maiores.</p> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Enlarge text with buttons and js, with limited max- and min sizes - Script Codes JS Codes
var _target = '.target', _size = 1;
$('.text-gr').on('click', function(){ _size = (_size >= 3) ? 3 : _size += 0.25; $(_target).css('font-size', _size + 'em'); $('.ticker').html('Current font size: ' + _size + 'em');
});
$('.text-kl').on('click', function(){ _size = (_size <= 1) ? 1 : _size -= 0.25; $(_target).css('font-size', _size + 'em'); $('.ticker').html('Current font size: ' + _size + 'em');
});
![Enlarge text with buttons and js, with limited max- and min sizes - Script Codes](http://shots.codepen.io/codewunder/pen/huvnA-512.jpg)
Developer | Eduard Mayer |
Username | codewunder |
Uploaded | July 13, 2022 |
Rating | 3 |
Size | 1,756 Kb |
Views | 56,672 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
CSSOff 2013 Submission | 14,766 Kb |
Whatsapp PTT Animation | 9,106 Kb |
Social Sharing Buttons | 2,711 Kb |
Infotype SVG Animation | 5,309 Kb |
Scrollable see-through headline | 3,171 Kb |
Social Slides | 2,985 Kb |
VelocityJS, fade on scroll | 2,296 Kb |
Twitter Widget Rebound | 4,890 Kb |
A Pen by Eduard Mayer | 2,130 Kb |
Enlarge text with buttons and js, with limited max- and min sizes | 1,756 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Scarlett Johansson Tribute Page | Diomed | 3,233 Kb |
Angular Sandbox | Alexgurrola | 1,616 Kb |
Parallax with only CSS | Thulioph | 2,297 Kb |
Elon Musk - Tribute Page - FreeCodeCamp | Yunnimun | 8,615 Kb |
Scroll using CSS | Casperovic | 2,159 Kb |
Test | Dviate | 2,668 Kb |
Swiftype Lower Third | Zumwalt | 4,796 Kb |
Table Exercise | Fresco | 9,585 Kb |
NT Tribute | Skybutterfly | 2,850 Kb |
Sketchy Box | Mnicpt | 3,033 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!