Firebug is complaining about this line:
$("#original-description").text(response['course']['original_description']).hide();
Do I have a syntax error? Looks fine to me.
More context:
bindOnSuccess($('#course-search'), function(response) {
if (!response) {
$("#system-status").text("Sorry, no course could be found for that search.");
}
else {
$(".dept-code").text(response['course']['dept_code']);
$(".course-number").text(response['course']['number']);
$(".course-title").text(response['course']['title']);
$("#div-original-description").show();
$("#original-description-teaser").show();
// error here
$("#original-description").text(response['course']['original_description']).hide();
$("#td-required-for").text(response['analysis']['cRequiredFor']);
}
});
response
is a JSON object. Could this problem be caused by invalid subscripts?
Firebug's error is:
$("#original-description").text(response.course.original_description).hide is not a function