You're comparing text to html
Change jQuery(this).text()
to jQuery(this).html()
.
Note that you might still have issues due to the way that browsers normalise HTML and you would probably be better off testing some other condition.
jQuery('#toggle_filter_link').click(function() {
jQuery('#searchfilter_wrap').slideToggle("slow");
var $this = jQuery(this);
if ($this.hasClass('show')) {
$this.removeClass('show');
$this.html('Hide ↑');
} else {
$this.addClass('show');
$this.html('Show ↓');
}
});
… or just testing for something that isn't going to be normalised:
jQuery('#toggle_filter_link').click(function() {
jQuery('#searchfilter_wrap').slideToggle("slow");
jQuery(this).html(jQuery(this).text().indexOf('Hide') > -1 ? 'Show ↓' : 'Hide ↑');
});