When I write Ajax with CakePHP's JsHelper, if I write something like this
$this->Js->get('#searchCity')->event(
'click', $this->Js->request(
'http://api.geonames.org/searchJSON', array(
'async' => true,
'dataExpression' => true,
'method' => 'GET',
'data' => "{}",
'dataType' => 'JSON',
'success' => ""
)
)
);
the output is something like this
$(document).ready(function() {
$("#searchCity").bind("click", function(event) {
$.ajax({async: true, data: {},
dataType: "JSON", success: function(data, textStatus) {
}, type: "GET", url: "http:\/\/api.geonames.org\/searchJSON"});
return false;
});
});
Apparently, the .bind () function does not work in Internet Explorer, and I read that I can use .on () to replace it.
The question is: can I change these methods without having to mess with CakePHP's core or is there any smarter solution?