+7

[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

+7

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. :(

+4

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

+3

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

+3

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

+3

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

+3

thanks @Burey. I'll check it out

+3

post updates :)

+3

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