Hi
I am using the javascript below to carry put an ajax call.
$('#tokenfield')
.on('tokenfield:createdtoken', function (e) {
$.ajax({
url: 'processProduct.php?action=addTag',
type: 'post',
data: {tag:e.attrs.value ,photo:83},
});
});
.tokenfield({
autocomplete: {
source: function (request, response) {
jQuery.get("processProduct.php?action=getTags", {
query: request.term
}, function (data) {
data = $.parseJSON(data);
response(data);
});
},
delay: 100
},
showAutocompleteOnFocus: true
});
When the page loads I get the following error in the console
yntaxError: expected expression, got '.' [Learn More] index.php:416
the unexpected '.' is the following line .tokenfield({
I am sure that the answer is really simple, but I can't figure it out at the moment, any hepp would be fantastic