Skip to content

Tag: javascript

Jquery form submission not being triggered

I’m new to JavaScript. I have been trying to design some code which geocodes a location when a search button is hit and the submits the form if successful. To make it to slightly more complicated, if an option from the autosuggest is selected, it also geocodes it even before the search button is hit. Th…

How to create empty 2d array in javascript?

How do I create an empty 2D array in Javascript (without knowing how many rows or columns there will be in the new array)? If it’s a simple array var newArray = new Array(); I can assign as many elements as I want. But what about a 2D array? Can I create one without specifying the numbers of rows and

Check if localStorage is available

I know there has been many questions about checking for localStorage but what if someone manually shuts it off in their browser? Here’s the code I’m using to check: Simple function and it works. But if I go into my Chrome settings and choose the option “Don’t Save Data” (I don&#8…

OnClick thumbnails – load image

I have a simple image gallery of about 25-30 photos with a thumbnails strip What i want is to load only the image that i click the thumbnail for not to wait until all the 25-30 photos are loaded because it slows down my website. Any ideas how to do that? Answer First, put all 25-30 photos on the page