* Add JS tips section to frontend documentation
* Replace document.getElementsByTagName('body') with document.body
* Replace querySelectorAll with faster selecting methods where appropriate
* Replace querySelector with faster selecting methods where appropriate
* Fix typo
* Fix forEach and getElementsByClassName
* Change querySelector* to faster methods in erb files
* Change querySelector* to faster methods in ruby files
* Fix runkit tag
* Various fixes
* Update app/assets/javascripts/initializers/initializeEllipsisMenu.js
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* Update app/assets/javascripts/utilities/slideSidebar.js
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* Commenting out flaky spec
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
8 lines
264 B
JavaScript
8 lines
264 B
JavaScript
const form = document.getElementsByClassName('sticky-footer-form')[0];
|
|
|
|
form.addEventListener('change', () => {
|
|
const saveFooter = document.getElementsByClassName('save-footer')[0];
|
|
if (saveFooter) {
|
|
saveFooter.classList.add('sticky', 'bottom-0');
|
|
}
|
|
});
|