Skip to content

Instantly share code, notes, and snippets.

@hsquareweb
Created August 14, 2012 17:34
Show Gist options
  • Save hsquareweb/3351089 to your computer and use it in GitHub Desktop.
Save hsquareweb/3351089 to your computer and use it in GitHub Desktop.
jQuery: Text Resizing Feature
// text resizing feature
$(".text-size").on('click','a',function(){
var $this = $(this),
$body = $("body").eq(0);
if($this.hasClass("small")){
$body.addClass("small").removeClass("large normal");
}
else if($this.hasClass("normal")){
$body.addClass("normal").removeClass("large small");
}
else if($this.hasClass("large")){
$body.addClass("large").removeClass("small normal");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment