Button Onclick Ajax Update?

I’m building a site where i have a like button for a post,post is a model here which is displayed on the page,when i click on the like button i want only the text in the button to change say from 0 likes to 1 like,without refreshing the whole page.?

i have tried render and render partial sadly no luck with it,please help me out with this.

Can you write down your code here?