Hi guys, Is it possible to add click events to elements such as containers and buttons? What’s the best approach with bricks? Thanks
@Hamish Yes, adding a click event to any button is now possible in Bricks 1.3 by adding Custom attributes.
All you need to do is edit your button, then under “Style > Attributes”, click the “+” icon to add your custom attribute. Under “Name” add onclick
, and for the “Value” anything you click.
Example value: alert('clicked')
. This will show a browser alert with the test “clicked” anytime the button is clicked
3 Likes
Thanks for the update! You are working hard and I love where it is going . Webflow doesn’t even have attributes with dynamic data.
1 Like