php - change image color in black and white and sepia on button click using jquery -


i have 2 different buttons. 1 black , white , other sepia . need change color of image on click of buttons. there jquery script change image color in black , white , sepia color.

thanks reply guys. found great solution css.on click of black , white button can call css.

.blackwhite-image { filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter  id=\'grayscale\'><fecolormatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333  0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /*  firefox 10+, firefox on android */ filter: gray; /* ie6-9 */ -webkit-filter: grayscale(100%); } 

and sepia

    .sepia-image     {     filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter     id=\'old-timey\'><fecolormatrix type=\'matrix\' values=\'0.14 0.45 0.05 0 0 0.12 0.39 0.04 0 0 0.08 0.28 0.03 0 0 0 0 0 1 0\'/></filter></svg>#old-timey");  -webkit-filter: sepia(1);     -webkit-filter: sepia(100%);     -moz-filter: sepia(100%);     -ms-filter: sepia(100%);     -o-filter: sepia(100%);     filter: sepia(100%);     } 

this working great me..


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -