Skip to content

Instantly share code, notes, and snippets.

@rruhlen
Last active July 20, 2017 17:20
Show Gist options
  • Select an option

  • Save rruhlen/6615894 to your computer and use it in GitHub Desktop.

Select an option

Save rruhlen/6615894 to your computer and use it in GitHub Desktop.
liquid to translate the article ratings for multiple language.
<script type="text/javascript">
$(function(){
$("#rate_article div:nth-child(1) a").click(function(){
$("#rate_article").css("visibility", "hidden");
window.setTimeout(showHello, 1000);
}).next().text("{{article_yes}}");
$("#rate_article div:nth-child(2) a").click(function(){
$("#rate_article").css("visibility", "hidden");
window.setTimeout(showHello, 1000);
}).next().text("{{article_no}}");
});
function showHello(){
$("#rate_article").text("{{article_thanks}}");
$("#rate_article").css("visibility", "visible");
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment