-
Aug 2nd, 2021, 08:37 PM
#1
Thread Starter
Fanatic Member
How to prevent page flickering and no loader?
Hi,
I'm trying to refresh a dashboard on my home page, the page is flickering with a loader, how to prevent it?
Code:
$.ajax({
type: 'post',
url: 'home/index',
data: {},
success: function (response) {
$('#dashboard').html(response);
-
Aug 4th, 2021, 11:11 AM
#2
Re: How to prevent page flickering and no loader?
You are not providing us with enough information. Is the flickering happening when you set the HTML of the $('#dashboard') element?
-
Aug 4th, 2021, 01:47 PM
#3
Re: How to prevent page flickering and no loader?
Try this:
Code:
$('#dashboard').hide().html(response).show();
Of course, I am making assumptions on what #dashboard is. I'm guessing a DIV. If that DIV has borders and what not, then .HIDE() and .SHOW() on that might flicker as well. If so, put a DIV inside #dashboard and hide/fill/show that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|