I'm just upgrading some code from cakephp 1.1 to 2.2.3 and I'm stuck on the ajax bits. The forms are completely different but they've I've reworked them just fine.
When I view the source I get this from the echo $this->Js->writeBuffer(); command
//<![CDATA[
$j(document).ready(function () {$("#AdlistingRegion").bind("click", function (event) {$.ajax({async:true, dataType:"html", success:function (data, textStatus) {$("#AdlistingDistrict").html(data);}, url:"\/adlistings\/getdistricts"});
return false;});
$("#AdlistingDistrict").bind("click", function (event) {$.ajax({async:true, dataType:"html", success:function (data, textStatus) {$("#AdlistingSuburb").html(data);}, url:"\/adlistings\/getsuburbs"});
return false;});});
//]]>
however firebug tells me
Uncaught TypeError: Property '$' of object [object Window] is not a function
This appears to be a flaw in the library which doesn't seem plausible but I've got the JS helper in the controller and can't see which step I've missed.
Does anyone have any ideas?