Sha256: 4b5cfc54e1d5035f912b33c39fe2049fcd4aaa5d926a6db32d4b877bf5e3beea
Contents?: true
Size: 884 Bytes
Versions: 9
Compression:
Stored size: 884 Bytes
Contents
// Form scripts $(function() { // Input Increment $(".ae-btn-increment").on("click", function() { var $button = $(this); var oldValue = $('.ae-input-increment').val(); if ($button.text() == "+") { var newVal = parseFloat(oldValue) + 1; } else { // Don't allow decrementing below zero if (oldValue > 0) { var newVal = parseFloat(oldValue) - 1; } else { newVal = 0; } } $(".ae-input-increment").val(newVal); }); // Button group selector $(".ae-btn-group-single .ae-btn").click(function () { $(this).addClass("ae-selected") .removeClass("ae-btn-border") .siblings() .removeClass("ae-selected") .addClass("ae-btn-border"); }); $(".ae-btn-group-multiple .ae-btn").click(function () { $(this).toggleClass("ae-selected") .toggleClass("ae-btn-border") }); });
Version data entries
9 entries across 9 versions & 1 rubygems