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 |
Social Sharing Buttons | 2,711 Kb |
CSSOff 2013 Submission | 14,766 Kb |
Twitter Widget Rebound | 4,890 Kb |
Scrollable see-through headline | 3,171 Kb |
Responsive GTA V Slider | 2,854 Kb |
VelocityJS, fade on scroll | 2,296 Kb |
Infotype SVG Animation | 5,309 Kb |
Social Slides | 2,985 Kb |
Whatsapp PTT Animation | 9,106 Kb |
A Pen by Eduard Mayer | 2,130 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 |
Css Rotating 3d cubes different speed | Dghez | 2,364 Kb |
NAV WPMANAGER | Mstoic | 1,991 Kb |
Weather App | Kw7oe | 3,162 Kb |
Pure CSS Spinners | Jlong | 2,043 Kb |
Donald Trump - The New Yorker | Agbales | 2,502 Kb |
CSS Infinite 360 | APinix | 5,564 Kb |
CSS Flip Animation | Bbodine1 | 2,525 Kb |
Responsive Table-less Shopping Cart | Alex_rodrigues | 6,637 Kb |
Toggling Divs with jQuery | Yying6 | 1,967 Kb |
E-mail Template | SoloMDFK | 4,871 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!