Reputation: 157
I have an accordion on my website and I use the jquery UI accordion function for it. It was working fine before when my code looked this like:
$ (function () {
$( "#accordion" ) .accordion({
collapsible: true
});
});
And now I added some code to add more function and the accordion stopped working. This is what it looks like now:
$ (function () {
$( "#accordion" ) .accordion({
collapsible: true,
change: function(event, ui) {
if(ui.newHeader[0].id == "cars") {
$("#homesearch").val('');
} else {
$("#carsearch").val('');
}
}
});
});
Any suggestions on what I have done wrong here?
Thanks in advance
Upvotes: 0
Views: 187
Reputation: 191729
You are missing a comma after collapsible: true
/ before change:
Upvotes: 1