Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8921327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T06:30:50+00:00 2026-06-15T06:30:50+00:00

ok so I have a portfolio I have to do for a project, the

  • 0

ok so I have a portfolio I have to do for a project, the front page is just a div with a loader and when you land on the front page it detects the screen size and chooses what content to pull in with ajax.

I am doing it this way because the iPad/Mobile site is really simple and I didn’t have enough time to make another site so its just a really simple version.

My problem is that it does not work in internet explorer at all.
It seems to load the content in, but does not do any of the functions after the load, such as applying plugins and hiding the loader.

I have a feeling its breaking when it starts counting the images, so I was wondering if I could use modernizer to detect if its internet explorer and do a simpler load function, or is there something wrong with my code?

The link to the site is http://chris-g.dmlive.co.nz/

and the load function is as follows

function loadSites(){

    var $winHeight = $window.height();  
    var $winWidth = $window.width();    

        if($window.width() >= 1025) {
            // is desktop so load all scripts and set heights to window height
            var $loadCont = $('.full-page');                
            var sourceTarget = '#ninja';
            var pageUrl='http://chris-g.dmlive.co.nz/ninja/';

            $loadCont.load(pageUrl+" "+sourceTarget, function(){

                var $slide = $('.slide');
                var $ninja = $('#ninja');

                //var $imgs = $(this).find("img");
                var $imgs = $ninja.find("img");
                $imgs.hide();
                var loadCounter = 0;
                var nImages = $imgs.length;
                $imgs.load(function () {
                    loadCounter++;
                    if(nImages === loadCounter) {

                        // all the images have loaded
                        // reveal them, remove the loading indicator
                        $imgs.show(); 
                        $slide.css({'height':$winHeight});  
                        $('#ninja-content').show();
                        $('.page-loader').fadeOut(500);                         
                        $ninja.interactiveScrolling();
                        $('#intro').parallaxScrolling();
                        $('#contact-form').formValidation();                            
                        $('#portfolio').portfolioAnimations();
                        callPopAnimations();

                    }

                // trigger load event if images have
                // been cached by the browser
                }).each(function () {
                    if(this.complete) {
                        $(this).trigger("load");   
                    }
                }); 

            }), function(){

            };  // end ajax load

        } else {
            // is a touch device so load in the stripped back site
            var $loadCont = $('.full-page');                
            var sourceTarget = '#basic-content';
            var pageUrl='http://chris-g.dmlive.co.nz/basic-page/';

            $loadCont.load(pageUrl+" "+sourceTarget, function(){

                var $basicContent = $('#basic-content');

                //var $imgs = $(this).find("img");
                var $imgs = $basicContent.find("img");
                $imgs.hide();
                var loadCounter = 0;
                var nImages = $imgs.length;
                $imgs.load(function () {
                    loadCounter++;
                    if(nImages === loadCounter) {

                        // all the images have loaded
                        // reveal them, remove the loading indicator
                        $imgs.show(); 
                        $('#portfolio').loadProjectBasic();
                        $('#contact-form').formValidation();    
                        $('.page-loader').fadeOut(500);
                        $('#ninja-content').show();
                    }

                // trigger load event if images have
                // been cached by the browser
                }).each(function () {
                    if(this.complete) {
                        $(this).trigger("load");   
                    }
                }); 

            }); // end ajax load

        }   // end if window width  

}   // end loadSites
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T06:30:54+00:00Added an answer on June 15, 2026 at 6:30 am

    Ok so I ended up making a variable in the head and decided that if you were using internet explorer you would not get the preloading, kind of hacky but needed to get it done as it was a site for a school assignment.

    <script>isExplorer = false;</script>    
    <!--[if IE]>
        <script>isExplorer = true;</script>
    <![endif]-->    
    
    and then adding an if statement to my jQuery 
    
        function loadSites(callback){
    
            var $winHeight = $window.height();  
            var $winWidth = $window.width();    
    
                if($window.width() >= 1025) {
                    // is desktop so load all scripts and set heights to window height
                    var $loadCont = $('.full-page');                
                    var sourceTarget = '#ninja';
                    var pageUrl='http://chrisgjones.com/ninja/';
    
                    $loadCont.load(pageUrl+" "+sourceTarget, function(){
    
                        var $slide = $('.slide');
                        var $ninja = $('#ninja');
                        var $ninjaCont = $('#ninja-content');
                        var $pageLoader = $('.page-loader');                    
                        var $intro = $('#intro');
                        var $contactForm = $('#contact-form');
                        var $portfolio = $('#portfolio');
    
                        if(isExplorer == true){
    
    
                            //alert('is ie');
                            $slide.css({'height':$winHeight});  
                            $ninjaCont.show();
                            $ninja.interactiveScrolling();
                            $intro.parallaxScrolling();
                            $contactForm.formValidation();                          
                            $portfolio.loadProjectBasic();
                            //callPopAnimations();
                            $pageLoader.hide();                                                 
    
                        }else if(isExplorer == false){
    
                            //alert('is not ie');
                            //var $imgs = $(this).find("img");
                            var $imgs = $ninja.find("img");
                            $imgs.hide();
                            var loadCounter = 0;
                            var nImages = $imgs.length;
                            $imgs.load(function () {
                                loadCounter++;
                                if(nImages === loadCounter) {
    
                                    // all the images have loaded
                                    // reveal them, remove the loading indicator
                                    $imgs.show(); 
                                    $slide.css({'height':$winHeight});  
                                    $ninjaCont.show();
                                    $ninja.interactiveScrolling();
                                    $intro.parallaxScrolling();
                                    $contactForm.formValidation();                          
                                    $portfolio.portfolioAnimations();
                                    callPopAnimations();
                                    //$('.page-loader').hide();     
                                    callback.call();                                                    
    
                                }   // end counter
    
                            // trigger load event if images have
                            // been cached by the browser
                            }).each(function () {
                                if(this.complete) {
                                    $(this).trigger("load");   
                                }   // end cache trigger load
                            }); // end each 
    
                        }   // end if is explorer or good browser
    
                    }); // end load
    
                } else {
                    // is a touch device so load in the stripped back site
                    var $loadCont = $('.full-page');                
                    var sourceTarget = '#basic-content';
                    var pageUrl='http://chrisgjones.com/basic-page/';
    
                    $loadCont.load(pageUrl+" "+sourceTarget, function(){
    
                        var $basicContent = $('#basic-content');
    
                        //var $imgs = $(this).find("img");
                        var $imgs = $basicContent.find("img");
                        $imgs.hide();
                        var loadCounter = 0;
                        var nImages = $imgs.length;
                        $imgs.load(function () {
                            loadCounter++;
                            if(nImages === loadCounter) {
    
                                // all the images have loaded
                                // reveal them, remove the loading indicator
                                $imgs.show(); 
                                $('#portfolio').loadProjectBasic();
                                $('#contact-form').formValidation();    
                                $('.page-loader').hide();
                                $('#ninja-content').show();
                            }
    
                        // trigger load event if images have
                        // been cached by the browser
                        }).each(function () {
                            if(this.complete) {
                                $(this).trigger("load");   
                            }   // end cache trigger load
                        }); // end each
    
                    }); // end ajax load
    
                }   // end if window width  
    
        }   // end loadSites
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my portfolio page I have this setup: <div id=portfolio> <ul id=sites> <li> <h3><a
I have a portfolio page which you can select a project and it will
I have created my Portfolio and put there a Google+ button. The page is
I am creating a portfolio page for m personal site. I have a slider
I am creating a portfolio page for m personal site. I have a slider
I'm trying to create a simple portfolio page. I have a list of thumbs
in my project i have a table named portfolio, which has an attribute called
I am creating a project in struts2 I have created a Registration.jsp page like
I have a slideshow of portfolio project images playing in a loop on my
So I have a basic (Wordpress powered) portfolio site where most of the content

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.