Reputation: 10117
Im using the jquery cookie plugin and getting an unexpected string error
when attempting to set it.
jQuery('#select').change(function() {
if(jQuery(this).val() == "defaultselect"){
jQuery.cookie('mycookie':'123456789'); // This line throws the error
}
return false;
});
Upvotes: 1
Views: 398
Reputation: 12503
You have a syntax error :
should be ,
jQuery('#select').change(function() {
if(jQuery(this).val() == "defaultselect"){
jQuery.cookie('mycookie','123456789'); //`:` should be `,`
}
return false;
});
Upvotes: 2