Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new options, href and closeCallback #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arthurhamon
Copy link

The href option allows you to lunch a modal from another element. href require an ID or a CLASS.
The closeCallback option is fire when you close the modal.

The href option allows you to lunch a modal from another element. href require an ID or a CLASS.
The closeCallback option is fire when you close the modal.
@bensz92
Copy link

bensz92 commented Apr 18, 2016

Hi! Nice job!! I need exactly the same usage here...
One question: in which format do you pass the href attribute to the function? As string, or just the id or class name? Can you please write an example of the usage?
Cheers,
Levi

@arthurhamon
Copy link
Author

@bensz92
The href is a string reference to an ID or a CLASS.
You can write {href:"#myID"} or {href:".myClass"}

Here is a simple example
I have this button.
<button class="Iam "></button>

When I click on it this modal is fire
$(".Iam").leanModal({href: ".iamModal",overlay:0.94,closeButton: ".close-modal"});

As you can see my href is a refer to a class element and here is my modal in my html
`

Test
X
`

So when I click on the button "Iam" the leanmodal function open the modal with the class "iamModal"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants