Reputation: 1388
I keep getting an unexpected token script error in developer tools. (fixed) Now I am getting an error involving my smarty function being used in my case..Uncaught SyntaxError: Unexpected identifier.
<script type="text/javascript">
$(document).ready(function () {
$("select[name=highSchool]").change(function () {
switch ($("select[name=highSchool]").val()) {
case 'Not yet attending':
$(this).parent().parent().sibling("tr#currentGrade").children("td#currentGrade").html(
"{html_options name='currentGrade' options=$currentGrade}");
break;
case 'Attending':
$(this).parent().parent().sibling("tr#currentGrade").children("td#currentGrade").html("");
break;
default:
$(this).parent().parent().siblings("tr#currentGrade").children("td#currentGrade").html("");
}
});
});
</script>
Upvotes: 0
Views: 3065
Reputation: 36619
The second-to-last line should be: });
otherwise your .change()
is left unclosed.
Upvotes: 3