// 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") }); });