I am using a loading icon for my Ajax functions as follows :
div id='loader' style="display: none;" align="right">
<img src="assets/img/ajax-loader.gif"/>
</div>
complete: function(){
$('#loader').hide();
},
beforeSend: function(data) {
$('#loader').show();
},
However If I want to have multiple spinners on the same page I will normally needs to have many divs e.g
div id='loader2' style="display: none;" align="right">
<img src="assets/img/ajax-loader.gif"/>
</div>
div id='loader3' style="display: none;" align="right">
<img src="assets/img/ajax-loader.gif"/>
</div>
etc ..
Is there a way to do this somewhat dynamically so I don't have to define every each of them ?