+ 8
[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.
8 Antworten
+ 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. :(
+ 5
Added image preloader. Seems to be working.
https://code.sololearn.com/WI81bcO3CP4c/?ref=app
+ 4
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
+ 4
Thanks for the answer, @Maz, I'm gonna try that. Found a way to preload images, well, a couple. Gonna experiment in a bit.
+ 4
this might be relevant to your image loading issue
https://code.sololearn.com/WXHUApnqKBUq/?ref=app
+ 4
thanks @Burey. I'll check it out
+ 4
post updates :)
+ 4
Added Maz's suggestion.
https://code.sololearn.com/WI81bcO3CP4c/?ref=app