Show Hide Row - JQuery

Hi
I would like to show / hide a row with JQUERY. Similar to how the accordion module works. I know how to do this with JQUERY / JavaScript in a normal HTML setup, but how can I do it with BeaverBuilder?

Can I add jQuery to the HTML module? Or is it best to enque and add a function?

Thanks

Hey Martin,
a quick solution if you’re using the BB theme is to go to “Appearence > Customize > Code > Javascript code” and add your jquery code there.

If you’re using another theme look for a similar option, some themes allow you to add JS code snippets in this way.

The universal solution that works everywhere with WP themes is to create https://codex.wordpress.org/Child_Themes

For the BB theme, have a look at your account downloads and get the BB child theme for a quick start, otherwise just follow the codex instructions to create your first child theme.

To load a JS file you need to add something similar to the following code in the functions.php file of your child theme:

function mythemejs() {
  wp_enqueue_script( 'mythemejs', get_stylesheet_directory_uri() . '/js/custom.js', array( 'jquery' ), '1.0', true );
}

add_action('wp_enqueue_scripts', 'mythemejs');

Hope this helps!