zuck.js
zuck.js copied to clipboard
Multiple instances in one page.
Normally you can't use 2+ zuck.js instance in one page, because zuck.js use same id to get model div. This can be fixed by following.
- give "zuck_model_perfix" in options
- use this prefix to make unique ids
- use only html classes to style elements in css 😜👈👌😉
Normally you can't use 2 zuck.js instance in one page, because zuck.js use same id to get model div. This can be fixed by following.
- give "zuck_model_perfix" in options
- use this prefix to make unique ids
- use only html classes to style elements in css 😜👈👌😉
Hallow please how do i add the perfix in options?
I have modified the original library and it works. If you, anyone need, I can upload it.👍.
@ChathuraGH would you mind to create a pull request?
Ok @ramonszo . I will create a pull request 👍.
@ramonszo I created a pull request 😊. I am new to pull requests. So if there is any inconvenience, help me.💪.
@ramonszo procedure is as follows.
-
use "modalContainer.classList.add('zuck-modal');" to add class to the modal > in zuck.js file
-
use this class to add css to modal element and child elements > in zuck.css file
-
Let user define option 'ZuckModal_perfix' > in html file
This perfix must me unique for every instance in the page.
- use this variable to create and access modal element and it's child elements > in zuck.js file
What is going on @ramonszo .. 👀👀 I created the pull request. If you can marge it or why it is not been? 🙏🙏. Tell me what is the problem; or you want working example or explanation. I just want to help. 🤗🤗.
@franklin-hub
Hallow please how do i add the perfix in options?
Did you get it to work?
@ramonszo, what is the problem here friend?
Hello 👈👈?
Hey @ChathuraGH I made a comment on your PR, thanks for the contribution