Is there a way to trigger a content area modal from a button within a Slider Revolution slide?
Hi Jonathan,
Thanks for reaching out.
It could be possible, let’s say you added a button on your slider. Go to the button’s attribute setting and add an ID, example, open_modal
Same for content area modal, add another ID like awesome_modal
Then simply add this code to Theme Options > JS to link the two
jQuery ( function($) {
$(document).on('click', '#open_modal', function() {
$('awesome_modal').click();
} );
} );
Hope this helps.
Thank you.
I’ve done this but it’s not working.
You can check it out here: manmadecreative.com/new (or manmadecreate.com - I’m moving it over to the main domain soon.)
The contact button to trigger the contact modal is in the second slide. You can also trigger the contact modal from the “Hit us up” button at the bottom of the page.
I discovered that “-modal” is automatically added to the id I assigned to the modal, so I changed the JS accordingly to (‘content_modal-modal’).click(); but it still doesn’t work.
Hi Jonathan,
Try this:
jQuery ( function($) {
$(document).on('click', '#open_modal', function() {
$('#contact_modal-anchor-toggle').click();
} );
} );
Please look how I use the correct ID of the button with ID identifier #.
See this: https://screencast-o-matic.com/watch/cqejjO0tWH
Hope this helps.
You are most welcome.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.