Thanks so much for all your help guys!
I changed it to use
$(window).load(function() { ... code goes here });
instead of
jQuery(document).readyfunction() { ... code ... )};
This ensures that all the images were loaded before my jQuery sizing and animation were applied to make the carousel.
I also applied some default CSS styling
display:none;
and then added
$('#slider').css("display", "block");
so that my carousel won’t show until the javascript is fully loaded and ready. Works much, much better!
Part of the reason this was so difficult is that this is a responsive design. Instead of loading the whole slider in via javascript, I decided to just load the DOM and then use javascript to remove the slider on small screens. Using window.load should ensure that barely any images are downloaded before they are removed.
If the screen size is over 768px, I then load the slider script and change the slider’s css to “display: block”.
Only thing I need to figure out now is how to make it work when the screen size is changed but the page is not reloaded. I tried using
$(window).resize(function() { ... }
but it gave me an error when I tried to use this function twice in one file. Any ideas there are appreciated!
Hope this helps someone else!