[Solved] Lets say I want my JavaScript to load all my image sources before the window loads....

How do I do that? Secondly, how would I make items on a page unselectable? I want it to feel like a mobile app, so I don't want loading going on during view, or the cursor for text selection to appear(or be usable) EDIT https://code.sololearn.com/WI81bcO3CP4c/?ref=app updated code, now unselectable. Thanks @Maz.

5/19/2017 6:19:51 PM

Russel Reeder

8 Answers

New Answer


html, body { -webkit-user-select: none; -ms-user-select: none; -khtml-user-select: none; -moz-user-select: none; -o-user-select: none; user-select: none; } This CSS code will make the elements unselectable ( credits to: @Tim G. ) For the JS code i can't help you, if i try to view your code my phone crashes. :(


Added image preloader. Seems to be working. https://code.sololearn.com/WI81bcO3CP4c/?ref=app


sorry, let me link a different code. older versions work on Pc and I hadnt made thew new one public. But nows as good a time as any https://code.sololearn.com/WI81bcO3CP4c/?ref=app Please tell me that one works


Thanks for the answer, @Maz, I'm gonna try that. Found a way to preload images, well, a couple. Gonna experiment in a bit.


this might be relevant to your image loading issue https://code.sololearn.com/WXHUApnqKBUq/?ref=app


thanks @Burey. I'll check it out


post updates :)


Added Maz's suggestion. https://code.sololearn.com/WI81bcO3CP4c/?ref=app