jQuery("body").delegate is not a function

Hi there,

I’ve just upgraded to the newest Yii version, but now som ajax buttons won’t work. Here’s my setup:

jQuery version 1.4.1

Yii framework 1.1.4

PHP code:




<?=CHtml::ajaxLink('Follow'.CHtml::image('/images/icons/accept.png'),array('subscription/subscribe','id' => $id, 'salt' => $salt, 'class' => $class),array('success' => 'function () {$(\'.follow\').hide();$(\'.follow-cancel\').show();}'))?>



Produced HTML:




jQuery('body').delegate('#yt0','click',function(){jQuery.ajax({'success':function () {$('.follow-cancel').hide();$('.follow').show();},'url':'/abonnement/afmeld?id=224&salt=fb120fa6e324296050348b40a3a785f5&class=Topic','cache':false});return false;}); 



Firebug console:

Thanks in advance :)

The delegate function requires jquery 1.4.2.

Thanks a lot