navigator.geolocation.getCurrentPosition sometimes works sometimes doesn’t

So I have a pretty simple bit of JS using the navigator.geolocation.getCurrentPosition jammy. Basically what’s happening here is we get the current position, if it’s obtained, two “watermarks” are placed in two fields that say “Current Position” and two hidden fields are created with the lat-long data as their value (they’re removed in the beginning … Read more

How to check ‘undefined’ value in jQuery

JQuery library was developed specifically to simplify and to unify certain JavaScript functionality. However if you need to check a variable against undefined value, there is no need to invent any special method, since JavaScript has a typeof operator, which is simple, fast and cross-platform: It returns a string indicating the type of the variable … Read more

jQuery creating objects [duplicate]

How would I create an object in jQuery, and then proceed to make a couple of different instances of this object I.e Create an object named box which holds a variable called color. And then make a couple of instances of this object with different stored colours.