Template:2012FR/Form-section/Radiobuttons/Default: Difference between revisions

Content deleted Content added
add js for checked amount class
clean up js, indentation
Line 46:
$(document).ready(function() {
 
$(".frequency-options > label").click(function() {
$(".frequency-options > label").removeClass("checked");
$(this).addClass("checked");
});
 
$(".radiobuttons-cell label, .input_amount_other").click(function() {
$(".radiobuttons-cell label").removeClass("checked");
$(".input_amount_other").removeClass("checked");
Line 58:
 
$(".input_amount_other").click(function() {
$("#radiobuttons-table > td").each(function() {
$(this).checked = false;
});
$(".input_amount_other").addClass("checked");
$("#input_amount_other_box").focus();
});
Line 94 ⟶ 90:
<tr>
<td class="radiobuttons-cell input_amount_0">
<input type="radio" name="amount" id="input_amount_0" onclick="selectAmount();" value="</html>{{{donate-amount-0}}}<html>" />
<label for="input_amount_0"></html>{{2012FR/CurrencyFormat|{{{donate-amount-0}}}|{{{currency}}}|{{{country}}}|{{{language}}}}}<html></label>
</td>
<td class="radiobuttons-cell input_amount_1">
<input type="radio" name="amount" id="input_amount_1" onclick="selectAmount();" value="</html>{{{donate-amount-1}}}<html>" />
<label for="input_amount_1"></html>{{2012FR/CurrencyFormat|{{{donate-amount-1}}}|{{{currency}}}|{{{country}}}|{{{language}}}}}<html></label>
</td>
<td class="radiobuttons-cell input_amount_2">
<input type="radio" name="amount" id="input_amount_2" onclick="selectAmount();" value="</html>{{{donate-amount-2}}}<html>" />
<label for="input_amount_2"></html>{{2012FR/CurrencyFormat|{{{donate-amount-2}}}|{{{currency}}}|{{{country}}}|{{{language}}}}}<html></label>
</td>
<td class="radiobuttons-cell input_amount_3">
<input type="radio" name="amount" id="input_amount_3" onclick="selectAmount();" value="</html>{{{donate-amount-3}}}<html>" />
<label for="input_amount_3"></html>{{2012FR/CurrencyFormat|{{{donate-amount-3}}}|{{{currency}}}|{{{country}}}|{{{language}}}}}<html></label>
</td>
</tr>
<tr>
<td class="radiobuttons-cell input_amount_4">
<input type="radio" name="amount" id="input_amount_4" onclick="selectAmount();" value="</html>{{{donate-amount-4}}}<html>" />
<label for="input_amount_4"></html>{{2012FR/CurrencyFormat|{{{donate-amount-4}}}|{{{currency}}}|{{{country}}}|{{{language}}}}}<html></label>
</td>
<td class="radiobuttons-cell input_amount_5">
<input type="radio" name="amount" id="input_amount_5" onclick="selectAmount();" value="</html>{{{donate-amount-5}}}<html>" />
<label for="input_amount_5"></html>{{2012FR/CurrencyFormat|{{{donate-amount-5}}}|{{{currency}}}|{{{country}}}|{{{language}}}}}<html></label>
</td>
<td class="radiobuttons-cell input_amount_6">
<input type="radio" name="amount" id="input_amount_6" onclick="selectAmount();" value="</html>{{{donate-amount-6}}}<html>" />
<label for="input_amount_6"></html>{{2012FR/CurrencyFormat|{{{donate-amount-6}}}|{{{currency}}}|{{{country}}}|{{{language}}}}}<html></label>
</td>
<td class="radiobuttons-cell input_amount_other">