Monthly Archives: July 2009

jQuery check for element visibility

What if the element exists in the DOM That was described in my recent post and it describes the case when you have a particular element in the DOM tree, or if that element does not exists. example: <div id="holder"> … Continue reading

Posted in javascript, micro tutorial | Tagged , , | 6 Comments

JavaScript closures in brief

What’s a closure Well every javascript programer knows that a variable defined in javascript file with the var declaration is global into all javascript code. var a = 12; console.log(a); that code prints 12 into the console. Note: console object … Continue reading

Posted in javascript, micro tutorial | Tagged , | Leave a comment

jQuery OS detection

JavaScript libraries and OS Particularly in that case I’m using jQuery which is enough famous, so I’m not going to introduce it, but however you can use any library, and this remains of your choice. The interesting part here is … Continue reading

Posted in javascript, micro tutorial | Tagged , , , | Leave a comment

jquery check for element existence in the DOM

Select the element If you’re familiar with jQuery, which I suppose is true, you know how to select an element, for instance if there’s an element with id element_id, you do: $(‘#element_id’) If the element exists in the DOM if … Continue reading

Posted in javascript, micro tutorial | Tagged , , | Leave a comment

write in the Safari javascript console

If you’ve to debug some script in Safari, and you’d wish to write into the javascript console, the simple advice is to use the same code as in Firefox. console.log(object); That’s all.

Posted in javascript, micro tutorial | Tagged , , , | Leave a comment