I am currently facing an issue with disabling the 'add' ('+') and 'subtract' ('-') buttons. The functionality should be as follows:
- quantity == 1 -> '-' button is disabled
- quantity > 1 && quantity < 15 -> both '-' and '+' buttons are enabled
- quantity >= 15 -> '+' button is disabled
If you have any suggestions or tips to assist me in resolving this issue, please feel free to share.
You can access my entire application on jsfiddle: https://jsfiddle.net/scgsc7or/23/
I attempted to address it using jQuery's addClass
and removeClass
, but unfortunately, when integrated into my $scope.addQuantity
function, it impacts all buttons rather than just the specific one involved.
Thank you in advance for any insights provided.