javascript - A "like" button similar to one in INSTAGRAM -
so thing working on sort of e-commerce website , here users "like" or "unlike" items have bought. looking button 1 in instagram - heart shape when clicked turns red , shows slight animation during transition.
i using glyphicon in bootstrap, smiley one, , using background-color:yellow;
glyphicon changes color of square inside icon resides.
i not great @ jquery , stuff hoping achieve in css if possible. or should go 2 different images.
in plane css, persistens changes - means click somethin, changes apperance , never changes - not possible. in css effect on hover, disappear when mouse stops hovering "heart".
recommend using jquery, simple use , makes first step sometimes, wont regret having bit of experience it.
in jquery apply .click()
event button , if gets triggered, use .animate()
enlarge , change background-color in lets 200ms transition , enlargement in reverse, animate()
.
thats prettiest , easiest way it, if want create e-commerce site has attract people appearance wont ably without jquery anyway.
Comments
Post a Comment