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');
});
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 |
Whatsapp PTT Animation | 9,106 Kb |
Social Sharing Buttons | 2,711 Kb |
Social Slides | 2,985 Kb |
VelocityJS, fade on scroll | 2,296 Kb |
A Pen by Eduard Mayer | 2,381 Kb |
Responsive GTA V Slider | 2,854 Kb |
Twitter Widget Rebound | 4,890 Kb |
Scrollable see-through headline | 3,171 Kb |
Animated Ubuntu Touch-styled checkboxes | 3,420 Kb |
CSSOff 2013 Submission | 14,766 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 |
Weather App 2 | MightyJoeW | 2,877 Kb |
Awesome textarea | Ayoungh | 1,977 Kb |
Twitch.tv API | Ryzokuken | 2,618 Kb |
Lightrays v2 | Sinthetyc | 2,903 Kb |
CSS Infinite 360 | APinix | 5,564 Kb |
GLSL Hills | Ykob | 6,991 Kb |
Video Player Custom Controls | EleftheriaBatsou | 3,665 Kb |
TigerWoods Freecodecamp Page | Baileytj | 2,869 Kb |
NgEasyModal | Lorenzodianni | 4,159 Kb |
Loading animation - freedom purchase | Rocbear | 2,567 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!