Dplusa25 Dplusa25 - 6 months ago 26
Vb.net Question

Add loading gif while page loads/queries VB.NET

I am trying to display a loading symbol while the page loads, as on a button click it takes roughly 40 seconds to load the data, and I want a placeholder.

I have tried to use jquery as shown:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">

$(window).load(function () {
$(".loader").fadeout("slow");
})
</script>


The .loader class CSS looks like this:

.loader

{
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
background: url('images/loading.gif') 50% 50% no-repeat rgb(249,249,249);
}


I receive an error when I run the project:
"Error: Object doesn't support property or method 'fadeout'"

What could be the issue?

Answer Source

Just a small mistake I figured out is that.

fadeout should be fadeOut

So,

   $(window).load(function () {
            $(".loader").fadeOut("slow");
   })

would work for sure. :)