Menu icon Foundation
Reveal Not Working as Expected – F6

I have a reveal modal implemented on my website, but on trigger, the website disappears.

I am using the most recent Foundation.

The button can be found lower on the page above FAQ.

What am I doing wrong?

You can review the website here.

revealfoundation 6

I have a reveal modal implemented on my website, but on trigger, the website disappears.

I am using the most recent Foundation.

The button can be found lower on the page above FAQ.

What am I doing wrong?

You can review the website here.

Val Ery over 1 year ago

Hi Natasha!

I do not know what specifically hinders the correct display of the modal window ... Therefore, I guess ..

1. You use Wordpress. The default version of jQuery in WordPress is 1.12. (see below)
2. Instead of writing

<script>
  jQuery(document).foundation();
</script>

you can add (not necessary) an additional file (for example, app.js) with the following content:

$(document).foundation();

3. Delete Foundation's initialization lines from slider.js

I am adding the following code when developing new themes for Wordpress (based on the Foundation):

function newtheme_scripts() {
	// Theme stylesheet
	wp_enqueue_style( 'main-style', get_stylesheet_uri() );
	// Framework stylesheet
	wp_enqueue_style( 'foundation', get_template_directory_uri() . '/assets/css/foundation.min.css' );
	// Custom stylesheet
	wp_enqueue_style( 'app', get_template_directory_uri() . '/assets/css/app.css?v=1.0.1' );

	
	// Deregister jQuery
	wp_deregister_script( 'jquery' );
	// Register new jQuery (needs a download)
	wp_register_script( 'jquery', get_template_directory_uri() . '/assets/js/vendor/jquery.js', false, '3.3.1', true );
	// Enqueue new jQuery
	wp_enqueue_script( 'jquery' );
	// Apps script
	wp_enqueue_script( 'foundation', get_template_directory_uri() . '/assets/js/vendor/foundation.min.js', array('jquery'), '6.4.3', true );
	// What input
  wp_enqueue_script( 'what-input', get_template_directory_uri() . '/assets/js/vendor/what-input.js', false, '4.2.0', true );
	// Custom scrits
	wp_enqueue_script( 'app', get_template_directory_uri() . '/assets/js/app.js', array('foundation'), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'newtheme_scripts' );

newtheme - it's just a prefix;all the styles and scripts - in the directory "assets"