background preloader

JavaScript / jQuery

Facebook Twitter

How Good C# Habits can Encourage Bad JavaScript Habits: Part 1. This is the first post in a multi-part series covering common mistakes C# developers tend to make when they first start writing JavaScript.

How Good C# Habits can Encourage Bad JavaScript Habits: Part 1

Introduction Many people come to jQuery and believe that their knowledge of a previous classical language (C#, Java, etc) will help them be successful at client-side scripting. You can use your classical language skills to accomplish a large amount of functionality with jQuery. Scrollfloater.js (Closure Library API Documentation - JavaScript) Don't let jQuery's $(document).ready() slow you down. jQuery’s $(document).ready() event is something that you probably learned about in your earliest exposure to jQuery and then rarely thought about again.

The way it abstracts away DOM timing issues is like a warm security blanket for code running in a variety of cold, harsh browser windows. Between that comforting insurance and the fact that deferring everything until $(document).ready() will never break your code, it’s understandable not to give much thought to its necessity. Wrapping $(document).ready() around initialization code becomes more habit than conscious decision. However, what if $(document).ready() is slowing you down? Minify JavaScript - Free JavaScript Compressor. Jquery parse json multidimensional array. jQuery: The Write Less, Do More, JavaScript Library. :visible Selector.