i'm trying to use yelp v2 js api.
when I try to trigger ajax call from form event, success is not fired (and nothing in firebug NET panel) I can step thru debugger to $.ajax line fine...
<script>
$(document).ready(function() {
$('#btnSubmit').click(function() {
.
.
.
$.ajax({
'type': 'GET',
'url': message.action,
'data': parameterMap,
'cache': true,
'dataType': 'jsonp',
'jsonp': false,
'jsonpCallback': 'cb',
'success': cbSuccess
});
});
});
</script>
however, when I run same code on page load (strip out wrapper $('#btnSubmit').click(function() from above code) it works fine. why is this?