$(document).ready(function(){
alert('Level1'); //this is getting fired
$.getJSON( "/data/widget.json", function(data) {
alert('level2'); //not getting fired
alert(data.widgetData.title);
});
});
i
want to get the JSON data and form html dynamically for the
widget....But i'm unable to get the JSON data $.getJSON not working
project structure
-----------------------
WidgetProject
|-------------> data
| |---------->widget.json
|-------------->widgetApp.html
widget.json
sample code
-------------------------------------------
{
"widgetData":
{
"title": "Example",
"status": "active",
}
}