Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

/*.cshtml*/
HTML
<div class="EventLoadingIcon" id="overlay" style="display:none">
   <img src="~/Images/loading.gif" style="width: 6%; margin-left: 43%; margin-top: 21%;" />
</div>



/*Jquery */
JavaScript
if(true)
{
 $('.EventLoadingIcon').css('display', 'block');
}


**********************
Guys it's not working on IE and Chrome While it's working on Firefox.
Need help asap.
Thanku
Posted
Updated 27-Aug-14 4:06am
v2
Comments
pankaj Dey 198320 27-Aug-14 10:31am    
please check the position of HTML in document, javascript should be at end of document..or if you write this code inside document.ready method it should work in every browser. and aslo don't forget to clear the browser cache..:)
TryAndSucceed 27-Aug-14 13:35pm    
Why dont you use id to hide or show?
Ashish Ranjan_Pirates 28-Aug-14 0:33am    
I tried , it also not working
Brian A Stephens 27-Aug-14 13:48pm    
jQuery simplifies the process of getting code to fire after the DOM is fully loaded: use $(document).ready()

1 solution

try this...

C#
if(true)
{
 $('.EventLoadingIcon').removeAttr('style');
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900