Skip to content

Instantly share code, notes, and snippets.

@thetekst
Created February 26, 2013 09:35
Show Gist options
  • Save thetekst/5037273 to your computer and use it in GitHub Desktop.
Save thetekst/5037273 to your computer and use it in GitHub Desktop.
jQuery toggle (spoiler)
<script>
jQuery(document).ready(function(){
jQuery(".content-'.$l_postID.' a.amore").toggle(
function() {
jQuery(".content-'.$l_postID.' a.amore span").css({"background-position":"100% 50%"});
},
function() {
jQuery(".content-'.$l_postID.' a.amore span").css({"background-position":"0% 50%"});
}
)
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment