Menu icon Foundation
Rerunning Equalizer using getHeights

My equalized content-sidebar layout gets messed up when accordion panels in my content div are opened, so I need to rerun Equalizer after Accordion is run.

Looking at Equalizer's JS functions, this is the script I attached to my page:

function equalizerItems(){};

$('.accordion').on('down.zf.accordion', function() {
	console.log("Accordion down event fired!");
	$('#horizontal').foundation('getHeights', equalizerItems);
	console.log("Height of first item in equalizer array: " + equalizerItems[0]);
	console.log("Height of second item in equalizer array: " + equalizerItems[1]);
	$('#horizontal').foundation('applyHeight', equalizerItems);
	$(document).foundation();
});

My console message for printing the array values gets displayed, but the values are unsurprisingly reported as 'undefined'. I don't know where this required array is coming from. I assume I'm supposed to supply it. I don't know how or where to do so. I assume that I need to create a callback function (where in the examples they use the identifier 'cb'), but I don't understand what this callback function is supposed to do, exactly.

EqualizergetHeightsfoundation6

My equalized content-sidebar layout gets messed up when accordion panels in my content div are opened, so I need to rerun Equalizer after Accordion is run.

Looking at Equalizer's JS functions, this is the script I attached to my page:

function equalizerItems(){};

$('.accordion').on('down.zf.accordion', function() {
	console.log("Accordion down event fired!");
	$('#horizontal').foundation('getHeights', equalizerItems);
	console.log("Height of first item in equalizer array: " + equalizerItems[0]);
	console.log("Height of second item in equalizer array: " + equalizerItems[1]);
	$('#horizontal').foundation('applyHeight', equalizerItems);
	$(document).foundation();
});

My console message for printing the array values gets displayed, but the values are unsurprisingly reported as 'undefined'. I don't know where this required array is coming from. I assume I'm supposed to supply it. I don't know how or where to do so. I assume that I need to create a callback function (where in the examples they use the identifier 'cb'), but I don't understand what this callback function is supposed to do, exactly.