hc-offcanvas-nav icon indicating copy to clipboard operation
hc-offcanvas-nav copied to clipboard

Events not working inside menu

Open kapdom opened this issue 3 years ago • 6 comments

Hi. I would like to add event on click to one of the menu element. But it looks like all events are cleared by your scrips. How to allowed add 'click' event inside menu?

kapdom avatar May 11 '21 03:05 kapdom

They shouldn't be cleared. Can you provide some code I can see?

somewebmedia avatar Jun 07 '21 11:06 somewebmedia

image image image

None of the events are working over menu items. please help me with this. this is important for me

shadaabbhut avatar Aug 05 '21 13:08 shadaabbhut

@somewebmedia can you please help me regarding this issue?

shadaabbhut avatar Aug 10 '21 05:08 shadaabbhut

Are you attaching your events to the original navigation before or after you have called HC Off-canvas Nav?

somewebmedia avatar Aug 12 '21 08:08 somewebmedia

I have the same problem right now. addEventListener called on Nav open isn't working for clicks and taps

        Nav.on('open', function(e, settings) {
            let btn = document.getElementById('testMe');
            btn.addEventListener('click', () => {
                console.log('clicked');
            });
        });

5ulo avatar Nov 03 '21 18:11 5ulo

So I found events are working when removeOriginalNav: true is set.

5ulo avatar Nov 03 '21 18:11 5ulo