This will make Quantity fields look like:
Quantity: [+] [ 1 ] [-]
Assuming jQuery is loaded, put the following into the bottom of layout Standard JavaScript Header Functions.
Quantity: [+] [ 1 ] [-]
Assuming jQuery is loaded, put the following into the bottom of layout Standard JavaScript Header Functions.
Code:
<style>.bumpbutton {padding:0 !important; width:15px !important; border:1px solid #aaa !important; background:#ccc;}</style> <script type="text/javascript"> $( document ).ready(function(){ $( "input[name^='Q_'][type='text']:visible" ) .before( '<input type="button" class="bumpbutton" value="+" onclick="var f=$(this).next(); var q=f.val(); f.val($.isNumeric(q) ? q - 0 + 1 : 0);" />' ) .after( '<input type="button" class="bumpbutton" value="-" onclick="var f=$(this).prev(); var q=f.val(); f.val($.isNumeric(q) && q > 0 ? q - 1 : 0);" />'); }); </script>
Comment