I have a loader,
<div id="loading">Loading..!</div>
<script>$('#loading').hide();</script>
and i want to show that loader automatically when a js function is started and hide when js function completed.
and in js file,
function myfunc{
$('#loading').show();
//some bla bla;
$('#loading').hide();
}
function myfunc1{
$('#loading').show();
//some bla bla;
$('#loading').hide();
}
.... .. ....
function myfuncN{
$('#loading').show();
//some bla bla;
$('#loading').hide();
}
i want to show loader automatically instead of writing that statement to every function.