jQuery

You are currently browsing articles tagged jQuery.

Recently, I ran across an IE6 issue relating to jQuery and select options. The error message from IE6 was “Could not set the selected property. Unspecified error.“, which appears to be related to a timing issue with the DOM.

Here’s the original code, which worked for IE7 and IE8:

function loadSelectItems(selOptions, ctrl, id) {
(ctrl).html(selOptions);
$(ctrl).val(id);
}

And here’s the solution, with no special browser hacks:

function loadSelectItems(selOptions, ctrl, id) {
$(ctrl).html(selOptions);
try {
$(ctrl).val(id);
}
catch(ex) {
setTimeout("$('" + ctrl + "').val('" + id + "')",1);
}
}

The setTimeout function provides enough delay, making the DOM available.

Tags: ,

The jQuery team recently released version 1.4 of their widely popular JavaScript library. This release includes significant performance improvements.

Many of the most popular and commonly used jQuery methods have seen a significant rewrite in jQuery 1.4. When analyzing the code base we found that we were able to make some significant performance gains by comparing jQuery against itself: Seeing how many internal function calls were being made and to work to reduce the complexity of the code base.

jQuery 1.4 addressed 207 bugs vs. 97 bugs in the 1.3 release. It also supports the following browsers 100%: Safari 3.2, Safari 4, Firefox 2, Firefox 3, Firefox 3.5, IE 6, IE 7, IE 8, Opera 10.10, and Chrome.

Ensure that you read through the list of potentially-breaking changes to be aware of what might cause problems in your applications.

jQuery 1.4 Full Release Notes

Tags: ,

jQuery on Twitter

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.

http://twitter.com/jquery

Tags: , ,