Mirror Click Script
Trigger a click on another element when one element is clicked in Webflow. This is perfect for allowing one element to control a click of another element.
Trigger a click on another element when one element is clicked in Webflow. This is perfect for allowing one element to control a click of another element.
How to add it
- Add the Javascript code to your closing body tag
- Update .trigger and .recipient with your target classes
The code
Javascript
<!-- Add to closing body section -->
<script>
$('.trigger').on('click', function(evt) {
setTimeout(function() {
$('.recipient').triggerHandler('click'); //element js will click
}, 500); //ms of time before action
});
</script>