JSFiddle - React, Tailwind, and code Playground

by informativejavascript

HTML

<button class='increase'>Increase</button>
	<button class='decrease'>Decrease</button>
	<button class='reset'>Reset</button>
<br />
<img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcT-cYNnwQZF6R0T5v11nnXOmdWWEGj4Tf7tKMhbB_FsNFo8yLmaeg" width=100px height=100px/>

JavaScript

(function display(){

		$('.increase').on('click',function(){
  			$('img').animate({
  				width:'+=2',
  				height:'+=2'
  				},100);
		});

		$('.decrease').on('click',function(){
  			$('img').animate({
  				width:'-=2',
  				height:'-=2'
  				},100);
		});
		$('.reset').on('click',function(){
  			$('img').animate({
  				width:'100',
  				height:'100'
  				},100);
		});

	})();