Jimmy Cuadra Web Services

RSS Recent Blog Posts

Keeping Track of JavaScript Event Handlers

When working with the DOM and JavaScript, adding, removing, and keeping track of event handlers can be tricky because there are multiple ways to do things and they’re not all consistent across different browsers. Things can be made a lot easier by using a JavaScript library, but it’s still useful to see how things are working behind the scenes, and may come in handy when you need to work with events without a library.

Read the full post

Tagged with: javascript

JavaScript factory constructors

In JavaScript, a constructor is simply a function. In order to use a function as a constructor, you call it using the new keyword. When you use this keyword, a new instance of the function is created and the constructor function executes in the context of the new instance. In other words, this within the constructor function will refer to the new instance that’s being created. The constructor will also implicitly return this (the new instance).

Read the full post

Tagged with: javascript, factory pattern

Do websites need to look the same in every browser?

There are numerous awesome new features introduced in HTML5 and CSS3, but neither specification is finalized and browser support for them is still pretty unreliable. After getting a taste of what these new technologies can do, it can be hard to resist using them and to wait for better browser support. My position for a long time has been that, although it’s frustrating as a developer, it’s best to create things for the lowest common denominator and not use features that don’t have reliable support across browsers. But my thoughts on the subject have been changing recently.

Read the full post

Tagged with: html5, css3, internet explorer, progressive enhancement

Find content by tags