Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Tuesday, September 07, 2010

How JSONP Works

Good article explaining some of what's going on behind the scenes when making JSONP calls using jQuery and using it with WCF.

Wednesday, February 17, 2010

A JavaScript sleep function

function sleep(delay)
{
var start = new Date().getTime();
while (new Date().getTime() < start + delay);
}

Source: http://www.ozzu.com/programming-forum/javascript-sleep-function-t66049.html

Remove non-jQuery Event with jQuery

It was driving me nuts trying to remove a checkbox onclick event that was created with JavaScript rather than through jQuery. After trying unbind(), click(), attr() etc. I found the solution on StackOverflow - use removeAttr():

$('#btnNext').removeAttr("onclick");