I have code like this:
$(function(){ $('.plus').click(function(){ var url = "/accounts/profile/update_thing/" + $(this).parent().attr('id') + "/", $.getJSON(url, function(data){ var items = [] $.each(data, function(key, val) { items.push('<li id="' + key + '">' + val + '</li>'); }); $('<ul/>', { 'class': 'my-new-list', html: items.join('') }).appendTo('body'); }); }) }) And Chrome code spectrator saying that i have Uncaught SyntaxError: Unexpected token . in line 4. But I don't know why. Does someone knows what is about?
Ps. Is it normal that I haven't text editor on this site?