Javascript

JQuery Mini-tips

Get a DOM object from a JQuery obj $(’#’ + id).get(0); //get the dom object from the jquery wrapper$(‘#’ + id).get(0); //get the dom object from the jquery wrapper Only include object if JQuery is available //only include if jquery…Continue Reading →

Check if an image exits.

Javascript can be used to check if an image exist. An AJAX call cannot be used, because cross-site calls are not supported. However, the javascript Image object can be used for this purpose. var img = new Image();var img =…Continue Reading →