Strange behavior when replacing AimeosPage.onHideOffscreen
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Strange behavior when replacing AimeosPage.onHideOffscreen
If I replace this function within $(function() { } in my custom js, it is not executed at all. If I replace it not nested, it is executed twice. Why is this happening?
click will not be logged if this block is nested within $(function() { } and will be logged twice if not nested
Code: Select all
AimeosPage.onHideOffscreen = function() {
$('.aimeos-overlay-offscreen').on('click', () => {
console.log("click")
$('.aimeos-overlay-offscreen').removeClass('show');
$('.zeynep.opened').removeClass('opened');
});
}
Re: Strange behavior when replacing AimeosPage.onHideOffscreen
The code seems to be correct. Is your custom.js file included after the aimeos.js file?loeffe1 wrote: ↑05 May 2023, 07:54Code: Select all
AimeosPage.onHideOffscreen = function() { $('.aimeos-overlay-offscreen').on('click', () => { console.log("click") $('.aimeos-overlay-offscreen').removeClass('show'); $('.zeynep.opened').removeClass('opened'); }); }
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star