I have a simple script in jquery to toggle a div (show and hide) when a is clicked (I\'m using bootstrap).
HTML:
Instead of overwriting the html every time, just toggle the class.
$('#click_advance').click(function() { $('#display_advance').toggle('1000'); $("i", this).toggleClass("icon-circle-arrow-up icon-circle-arrow-down"); });