I have a very simple setup:
var genres;
$.get('/api/genres', '', function (response) {
    genres = response.data
}, 'json');
$("#genre").tagit({
    availableTags: genres //this doesn't work
});
For some reason the genres variable is not accessible inside the tagit method. How would I achieve this?
 
    