-
Refactored Button Creation:
- Changed button creation from
var btn_add = document.createElement("BUTTON");
toconst btnAdd = createButton('ASCM_addall', 'Add All', '120px');
.
- Changed button creation from
-
Button Placement:
- Adjusted button placement to be directly under the ".collectionAddItemsSection" div.
-
Button Styling:
- Removed inline styling for buttons and applied styles within the
createButton
function.
- Removed inline styling for buttons and applied styles within the
-
Button Event Listeners:
- Changed event listeners from jQuery syntax (
jQuery('button#ASCM_addall').click(...)
) to vanilla JavaScript (btnAdd.addEventListener('click', ...)
).
- Changed event listeners from jQuery syntax (
-
Button Styling (Background Color and Border):
- Updated button background color and removed borders for a cleaner appearance.
-
Button Container Styling:
- Adjusted styling of the container div for the buttons.
-
Positioning of Buttons:
- Moved the positioning of the buttons into the
createButton
function.
- Moved the positioning of the buttons into the
These changes aim to enhance code structure, readability, and maintainability. If you have any specific questions about the modifications, feel free to ask!