dobarkod / cookie-banner

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

moreinfo not working #29

Closed justfalias closed 7 years ago

justfalias commented 9 years ago

Hi there,

I'm trying to use moreinfo parameter but it's not working. Others like data-message or data-linkmsg are working fine. Any clue?

Thanks in advance

zytzagoo commented 9 years ago

Hi, can you create a jsfiddle or provide a link that demonstrates the issue?

Maybe there's something specific to the value of that option that you're trying to set that's causing it to fail, hard to say without more details...

justfalias commented 9 years ago

I created a jsfiddle but it's not working. I can't add the external resource because the URL is not https. Anyways here it is the code:

https://jsfiddle.net/ezq9kv4y/

zytzagoo commented 9 years ago

Yeah, options set via data attributes need their name to be prefixed with data- in HTML. Updated fiddle that works as expected: https://jsfiddle.net/ezq9kv4y/1/

Edit: The "fix" is to just change <script ... moreinfo="..."> to <script ... data-moreinfo="...">

justfalias commented 9 years ago

Thanks a lot! Now everything it's working fine, it was an easy error to solve but in the documentation I only read moreinfo without data prefix. I guess I have to read more carefully :)