Menu icon Foundation
Reinit Equalizer inside Interchange

Hi there,

 

I have an interchange element that loads 3 different templates based on user device.

Inside those 3 templates I have some cards that use Equalizer to stay on the same height.

So I need to reinit equalizer after on of the 3 templates has been loaded, and I'm doing like this:

 

  	$('#js_interchangeContainerDiv').on("replaced.zf.interchange", function(){
			$container = $('#js_interchangeContainerDiv');
			if (Foundation.MediaQuery.atLeast('medium')) {
				$($container).foundation();
			};
	})

 

Questions:

1) Why Foundation.reInit('equalizer'); doesn't work? I had to use $($container).foundation(); instead

2) I'm getting this alert: foundation.min.js:3 Tried to initialize interchange on an element that already has a Foundation plugin. Is there a way to avoid it?

 

Equalizerinterchange

Hi there,

 

I have an interchange element that loads 3 different templates based on user device.

Inside those 3 templates I have some cards that use Equalizer to stay on the same height.

So I need to reinit equalizer after on of the 3 templates has been loaded, and I'm doing like this:

 

  	$('#js_interchangeContainerDiv').on("replaced.zf.interchange", function(){
			$container = $('#js_interchangeContainerDiv');
			if (Foundation.MediaQuery.atLeast('medium')) {
				$($container).foundation();
			};
	})

 

Questions:

1) Why Foundation.reInit('equalizer'); doesn't work? I had to use $($container).foundation(); instead

2) I'm getting this alert: foundation.min.js:3 Tried to initialize interchange on an element that already has a Foundation plugin. Is there a way to avoid it?

 

Francesco Pensabene 3 months ago

No one?

Francesco Pensabene 3 months ago

No one?