Archive for category 'Javascript'
$(“#objectID”) != document.getElementById(“objectID”)
Using document.getElementById(“…”) in plain ol’ Javascript will return a reference the DOM element by the given name. In jQuery, we use $ for everything. So I assumed using $(“#…”) would be the same thing. This is wrong. $(“#…”) will return an associative array (object) which is what allows us to change properties of the DOM … Continue reading
JavaScript Random Between Function
Generally random number functions pick a number between 0 and another number. Every couple of months I run into a case where I need to pick a random number between two numbers. For example I need a random number between 5 and 10. I always seems to have a tough time finding one online for … Continue reading
FancyZoom 1.1
I recently found FancyZoom 1.1 which is the Mac-esque version of Lightbox or Thickbox. I like it and I think it has a lot of potential. The pros and the cons: Pros: It doesn’t black out the entire screen to display the image. Allows you to be able to click on other images or links … Continue reading
