jQuery进度条,带有对json的ajax请求

我需要一些关于ajax请求和jQuery进度条中数据使用的帮助。

这是index.html

这是test.json

 { "progressbar":12 } 

这是JavaScript代码

 $(function() { $.ajax({ dataType:"json", url: test.json, success: , }); $( "#progressbar" ).progressbar({ value:  }); }); 

对不起,我不习惯jQuery和json。 我很高兴有一个非常好的例子!

非常感谢你!

使用您的成功更新进度条

 $(function() { $.ajax({ dataType:"json", url: "https://gist.githubusercontent.com/quannt/d60905a978058de2312b/raw/2d4ab1df422dc19b7214d10ffd5e80795e2aa0a5/gistfile1.txt", success: function(data){ $( "#progressbar" ).progressbar({ value: data.progressbar }); } }); }); 

在这里小提琴