dobarkod / cookie-banner

JavaScript based cookie-info banner for complying with EU cookie law
MIT License
425 stars 85 forks source link

Clicking "Learn more" without closing the banner #24

Closed annelbco closed 9 years ago

annelbco commented 9 years ago

I was wondering if there is any way to click the Learn more link without closing the banner and accepting the cookie..?

zytzagoo commented 9 years ago

That's the way it should be by default.

What happens when you download/clone the repo and run the demo? Can you provide a link/fiddle/something demonstrating the opposite?

annelbco commented 9 years ago

It turns out my modification on the src js itself causes it.

I pulled the latest changes from the repo and customized it again one by one. I actually wanted the learn more link to be a popup rather than as href. On the banner I've got 3 buttons (learn more, print, agree) that I enclosed a parent <div> on them and float it on the right side to separate the message from the buttons. This extra div causes the banner to close when clicking one of the buttons.

Currently I was able to implement it without the banner closing, by assigning/using classes on each of the buttons instead.

Thank you.