jQuery UI Tooltip + JSON Data
Can anybody be so nice and tell me what I'm doing wrong?
I'm trying to load JSON data with $.getJSON(). I'd like to read data only for current element ID (ex. read only tooltip content for id="name" field). And... it's not working :(
- $(".tool").tooltip({
- content: function(response) {
- $.getJSON('/static/tooltipcontent.json', function(data) {
- response($.map(data, function(item) {
- return item.name;
- }))
- });
- }
- },
- });
Does anybody see any issues here?