Jump to Navigation

Reply to comment

Hello. First of all, great tutorial. Anyhow, I've been struggling as I'm trying to create my data variable from a text. For example, if I have the text :

{text:'Web Design', url:' http://www.nimpkish.com/web-design'},
{text:'Web Development', url:'http://www.nimpkish.com/web-development'}, 
{text:'Drupal Development', url:'http://www.nimpkish.com/drupal'}, 
{text:'Graphic Design', url: 'http://www.nimpkish.com/graphic-design'}

and I do : var data=[$("#data").text().split("//")]; $("#autocomplete").autocomplete(data, { formatItem: function(item) { return item.text; } }).result(function(event, item) { location.href = item.url; }); That is not working, because my "data" is not a item array. Do you know how to make it as an item array, by any chance ? Thank you very much in advance. Tom