Skip to content

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