#heart button

LIVE

Btw, thank for the FUNDS

1. Copy and paste this code BEFORE </head> tag.

<style> .my-like { background-image: url(http://static.tumblr.com/b8yqvki/yxFmajxa5/amandarickathemeunliked.png) !important; height:20px; width:21px; cursor:pointer; display:inline-block; vertical-align:top; } .my-liked, .my-like:hover { background-image: url(http://static.tumblr.com/b8yqvki/CCTmajxau/amandarickathemeliked.png) !important; height:20px; width:21px; cursor:pointer; display:inline-block; vertical-align:top; } </style> <script> window.onload = function () { document.body.insertAdjacentHTML( 'beforeEnd', '<iframe id="my-like-frame" ></iframe>' ); document.addEventListener( 'click', function ( event ) { var myLike = event.target; if( myLike.className.indexOf( 'my-like' ) > -1 ) { var frame = document.getElementById( 'my-like-frame' ), liked = ( myLike.className == 'my-liked' ), command = liked ? 'unlike' : 'like', reblog = myLike.getAttribute( 'data-reblog' ), id = myLike.getAttribute( 'data-id' ), oauth = reblog.slice( -8 ); frame.src = 'http://www.tumblr.com/' + command + '/' + oauth + '?id=' + id; liked ? myLike.className = 'my-like' : myLike.className = 'my-liked'; }; }, false ); }; </script>

2. Then put this code between {block:Posts} and {/block:Posts}. Usually close/near to reblog button.

<div class="my-like" data-reblog="{ReblogURL}" data-id="{PostID}" title="Like"></div>

3. Save and see your page if its work or not. If not work, maybe you put the step 2 code in wrong place, so try to move them until the code work but the code must in between {block:Posts} and {/block:Posts}. Just do experiment with yourself ;).

loading