I have some jQuery that shows/hides div #loading with a spinner inside of it depending on .ajaxStart or .ajaxStop. However it seems too general. Other links I click - or forms I try and submit - trigger the spinner. So is there a way to limit the code below to apply only to the links in my ul#infoContainer?
$(function() { $('#loading') .hide() // hide initially .ajaxStart(function(){ $(this).show(); }) .ajaxStop(function(){ $(this).hide(); }) });