Skip to main content
Mediaweb Logo

Mediaweb

Events & Interactions

Learn how to add interactive behaviors to your website elements using events, quick actions, and custom scripts.

Events & Interactions

Events and interactions allow you to add dynamic behaviors to your website elements, making your site more engaging and functional. While this feature can be complex for non-technical users, our AI agent is designed to help make this process much easier - simply describe what you want to happen, and the AI can help set up the appropriate events and actions for you.

Events are triggered by user interactions like clicks, hovers, or form submissions. When an event occurs, it can execute various actions such as showing/hiding elements, navigating to different pages, or running custom scripts.

How Events Work

The events system operates on a trigger-action model. You select an element, choose what should trigger the event (like a click), and then define what action should happen when that trigger occurs.

Event Types

Click Events: Triggered when users click on an element

  • Button clicks
  • Link navigation
  • Image interactions
  • Menu toggles

Hover Events: Activated when users hover over elements

  • Tooltip displays
  • Image previews
  • Menu dropdowns

Form Events: Related to form interactions

  • Form submissions
  • Input field changes
  • Validation triggers

Page Events: Occur during page lifecycle

  • Page load actions
  • Scroll-based triggers
  • Resize events

Events Tab

Quick Actions

Quick actions provide pre-built, common interactions that you can easily apply to elements without writing code. These are perfect for most standard website behaviors.

Events Modal

  • Go to Page: Navigate to another page on your site
  • Go to URL: Navigate to an external website
  • Go to Section: Scroll to a specific section on the current page
  • Go Back: Return to the previous page in browser history

Element Actions

  • Show Element: Make a hidden element visible
  • Hide Element: Hide a visible element
  • Toggle Element: Switch between showing and hiding an element
  • Toggle Class: Add or remove CSS classes from elements

Form Actions

  • Submit Form: Process form data
  • Reset Form: Clear all form fields
  • Validate Form: Check form data before submission

Media Actions

  • Play Video: Start video playback
  • Pause Video: Stop video playback
  • Toggle Video: Switch between play and pause states

Custom Actions & Scripts

For advanced functionality that goes beyond quick actions, you can create custom scripts and actions. This is where the AI agent becomes particularly valuable, as it can help generate the appropriate code based on your requirements.

JavaScript Actions

Write custom JavaScript code to create complex interactions:

  • Dynamic content updates
  • API integrations
  • Advanced animations
  • Custom form processing
  • Third-party service integrations

CSS Animations

Create custom CSS animations and transitions:

  • Smooth element transitions
  • Complex keyframe animations
  • Interactive hover effects
  • Loading animations

Events Modal Script

Working with Custom Scripts

When creating custom scripts, you have access to:

  • Element References: Target specific elements on your page
  • Event Data: Access information about the triggering event
  • Global Variables: Share data between different scripts
  • Browser APIs: Use modern web APIs for advanced functionality

Best Practices

  • Start Simple: Begin with quick actions before moving to custom scripts
  • Use AI Assistance: Describe your desired behavior to get help with implementation
  • Test Thoroughly: Always test events across different devices and browsers
  • Keep It Accessible: Ensure interactive elements work with keyboard navigation
  • Performance Conscious: Avoid heavy scripts that might slow down your site

Remember, the AI agent can help translate your ideas into working code, making complex interactions accessible even if you're not familiar with programming. Simply describe what you want to achieve, and let the AI guide you through the implementation.

Last updated: September 30, 2025