我想從一個函數的值傳遞給「值:」動畫充分利用JSON值中插入另一個功能JS
通專門在這兒,說:「值:12」取代
http://jsfiddle.net/JoelGarcia/jL3fn/14/
:用於JSONvar updateJackpots = function()
{
$.support.cors = true;
$.ajax({
url: 'https://www.ganegrande.do/ajax/getjackpots',
cache: false,
crossDomain: true,
dataType: 'json',
success: function(data) {
var total = 0; $('#total').remove();
//update the jackpots
$(data).each(function(i, el)
{
total += getMoneyValue(el.formatted_value);
});
//update the total
$('<div id="total"/>').html(''+commaFormatted(parseFloat(total).toFixed(2))).appendTo('body');
//update jackpots again after 30 seconds
setTimeout(updateJackpots, 864000000);
},
error: function(i,a,e)
{
alert(i + a + e);
}
});
}; updateJackpots();
...
function loadCounter(){
customCounter = new Counter("customCounter", {
...,
value : 12 <!-- HERE SHOULD GO THE JSON RESULT "2544423.11" AUTOMATICALLY -->
});
customTimerId = window.setInterval(function(){
...
}, 2050);
}
loadCounter();
});
完整的代碼是在下面撥弄的結果的值
你能告訴我們唯一重要代碼,這樣你只是混淆誰想要幫你 – Alen
好了人,對不起!即時消息太累了。我會以任何方式獲取帳戶 – user3178314
要小心:10000000000000000000000000000000000000000 <10000000000000000000000000000000000000001 = false :)) –