JSFiddle - React, Tailwind, and code Playground

by informativejavascript

HTML

<button class='increase'>Increase</button>
	<button class='decrease'>Decrease</button>
	<button class='reset'>Reset</button>
<div class="div1">
This is the sample text and now check how the font increases and decreases when clicked on the respective button click.
<br />

</div>

JavaScript

(function display(){

		$('.increase').on('click',function(){
  			$('div.div1').animate({
  				fontSize:'+=1'
  				},100);
		});

		$('.decrease').on('click',function(){
  			$('div.div1').animate({
  				fontSize:'-=1'
  				},100);
		});
		$('.reset').on('click',function(){
  			$('div.div1').animate({
  				fontSize:'16'
  				},100);
		});

	})();