DS928
asked on
Page not loading properly
Whenever I click on the News link or other links at the bottom of my homepage and it goes to the new page. The page is not loading properly. I am missing the links at the bottom as well as the player. If I hit the refresh button they appear. Same happens when I go back to the home page. I have to refresh. Any help is appreciated, Thank you. The site.
www.audiodigz.com
I can attach whatever files you request.
www.audiodigz.com
I can attach whatever files you request.
ASKER
Same browser. Same windows. I just tried it as well. You will notice that the links for Terms of Service, privacy policy, etc are missing as well as the audio player when you go back to the homepage. You then have to refresh to get em back. Is something stopping it from loading?
Okay, sure I see the issue, just looking through the code.
The first thing I would try is move all your custom JS to the bottom of the page, just before the </body>
It all seems to be in the right order but depending on how the page loads, the elements could be missed
The first thing I would try is move all your custom JS to the bottom of the page, just before the </body>
It all seems to be in the right order but depending on how the page loads, the elements could be missed
ASKER
Okay I moved this....
This is the code I added. Its now at the bottom....still not loading. I cleared the browser, and restarted.
<script>
jQuery(function($) {
//settings
var $slider = $('.slider'); // class or id of carousel slider
var $slide = 'li'; // could also use 'img' if you're not using a ul
var $transition_time = 1000; // 1 second
var $time_between_slides = 4000; // 4 seconds
function slides(){
return $slider.find($slide);
}
slides().fadeOut();
// set active classes
slides().first().addClass('active');
slides().first().fadeIn($transition_time);
// auto scroll
$interval = setInterval(
function(){
var $i = $slider.find($slide + '.active').index();
slides().eq($i).removeClass('active');
slides().eq($i).fadeOut($transition_time);
if (slides().length == $i + 1) $i = -1; // loop to start
slides().eq($i + 1).fadeIn($transition_time);
slides().eq($i + 1).addClass('active');
}
, $transition_time + $time_between_slides
);
});
This is the code I added. Its now at the bottom....still not loading. I cleared the browser, and restarted.
Please also post your PHP. I think that the way you're processing the GET request is causing issues.
e.g.
?a=welcome
e.g.
?a=welcome
The elements are different between when the page works and when it doesn't. The player isn't there as the <div id="sound-player"> isnt in the page. How is that element inserted? via javascript or PHP?
ASKER
ASKER
its javascript. wrapper.html is where the player lives.
okay... you've got this hosted on Ghost?
I suspect that there's an issue with your template and the templating system (PHP side) is bombing out. e.g. Do you have the PageMain() function code?
There's also duplicated IDs in the content.html, e.g. <div class="welcome-full" id="welcome-explore"> appears more than once. IDs should not be duplicated.
Also, do you have the templates for the following as they appear just before the player and could be malformed:
{$go_pro}
{$ad}
I suspect that there's an issue with your template and the templating system (PHP side) is bombing out. e.g. Do you have the PageMain() function code?
There's also duplicated IDs in the content.html, e.g. <div class="welcome-full" id="welcome-explore"> appears more than once. IDs should not be duplicated.
Also, do you have the templates for the following as they appear just before the player and could be malformed:
{$go_pro}
{$ad}
ASKER
Okay, it's definitely looking like it bombs when replacing the {$ad} section of the template. Where is this done. Can you test by removing it from content.html so that the last line of content.html is just {$go_pro}
ASKER
Doing it. Still bombing. This happened after I placed the News section in and the code for it. Should I move the function from the wrapper page over to the slider.js page?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Removed that javascript and just did a plain link works fine now. Thank you.
Excellent! :) glad I could help
This is the link i clicked: http://audiodigz.com/index.php?a=page&b=news3