Wednesday, November 17, 2010

flickering issue with jquery in sharepoint

Hi,

I had flickering issue on sharepoint site when i try to use jQuery. I search lots but none of solution works for me.Few solution are there on some blogs like:-
http://weblogs.asp.net/wesleybakker/archive/2008/12/29/Eliminate-page-flicker-in-SharePoint.aspx
http://weblogs.asp.net/wesleybakker/
http://www.alligatortags.com/alligatortags-12-29-2008.html
http://www.developerit.com/en/search/page-138/get-the-title
http://www.psearch.info/s/irritating-flicker-postbacks-server
as per these above blogs below code solve issue
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0.0)" />
but all these does not solve my issue. Finaly i got solution which is mentioned below:-

In sharepoint we start using jQuery or JavaScript like below:-
<script type="text/javascript">

_spBodyOnLoadFunctionNames.push("RoundCorner");
function RoundCorner() {
// all js code will come here
$('div.graybackground').corner("round");
// all js code will come here
}
</script>

I add two lines extra in script and replace function as below:-
<script type="text/javascript">

_spBodyOnLoadFunctionNames.push("RoundCorner");
function RoundCorner() {
$('body').css('display', 'none');
// all js code will come here
$('div.graybackground').corner("round");
// all js code will come here
$('body').css('display', 'block');
}
</script>

 
Thanks!
Avinash

1 comment:

Sunil said...

Hi Avinash,

I want to talk to you, can you pl. call me in my mobile 96326420.

Sunil