Archive for the ‘jQuery UI’ Category

$.ajax IE7/8 memory leak

There is a known bug in jQuery 1.4.2 (and possibly <=1.4.2 or 1.4.*) that causes a memory leak when using $.ajax in IE7 and IE8. It should be noted that the impact is only significant on pages that make frequent ajax requests as per the sample below. i.e.: Watch IE8′s memory usage spike with this sample:

<html>
<head>
<script type=”text/javascript” src=”/javascripts/jquery-1.4.2.js”></script>
<script type=”text/javascript”>
var requestData = function() {
$.ajax({
url: ‘http://localhost/data.json’,
type: ‘GET’,
contentType: ‘application/json’,
complete: function() {
setTimeout(requestData, 100);
}
});
}
$(requestData)
</script>
</head>
<body>
Memory Leak Testing…
</body>
</html>

Pines Notify is a JavaScript notification plugin, developed by Hunter Perrin as part of Pines. It is designed to provide an unparalleled level of flexibility, while still being very easy to implement and use. It uses the jQuery UI CSS library for styling, which means it is fully and easily themeable.

It’s simple. Assign your .datepicker to a <div> instead of an imput box.

$(function() { $("#datepicker").datepicker(); });

Date: <div id="datepicker"></div>