You just need to return false in the onclick handler. If onclick returns false, then reloading postback / page will stop.
<a href="#" onclick="VSASearch.toggleDetail(this);return false;" />
Or you can return the result of your functions as follows:
toggleDetail : function(obj) { $(obj).parent().parent().next().toggleClass('hide'); $(obj).text() == 'Show' ? $(obj).text('Hide') : $(obj).text('Show'); return false; },
from
<a href="#" onclick="return VSASearch.toggleDetail(this);" />
source share