Ported to latest jQuery.