Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function newBetCalculate() {
- var total = 0;
- $("#betpoll .item").children('input[name="worth"]').each(function( index ) { total += parseFloat($(this).val()); });
- total = Math.round(total * 100) / 100;
- $(".yourValValue").html(total);
- $(".teamAValue").html( Math.round((valB*total/valA) * 99) / 100 );
- $(".teamBValue").html( Math.round((valA*total/valB) * 99) / 100 );
- var totalKey = 0;
- $("#betpoll .item").children('input[name="ldef_index[]"]').each(function( index ) { totalKey += parseInt($(this).val()) == 15003 ? 1 : 0; });
- $(".yourValKey").html(totalKey);
- $(".teamAKey").html( Math.round((keyB*totalKey/keyA) * 97) / 100 );
- $(".teamBKey").html( Math.round((keyA*totalKey/keyB) * 97) / 100 );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement