Ok, I have this slight issue, I am using JointsWP with WordPress, and also loading custom fonts from Typekit. The fonts load with a slight delay and they keep flashing on the screen when swapping with fallback (issue for another time). I am trying to use Equalizer (Documentation) to equalize the heights on two columns.
Because the fallback font is slightly smaller/lower, when TypeKit loads, the Equalizer has already loaded its heights and therefore it falls a bit short. For instance the Height without Typekit is 320px and with Typekit fonts should be 325px. I have this callback function from Typekit, that should fire after the fonts have finished loading.
try {
Typekit.load({
active: function() {
console.log("test")
var elem = new Foundation.Equalizer(element);
elem.applyHeight(); // Foundation 6
}
})
} catch(e) {}
However, I get an error
Uncaught (in promise) ReferenceError: element is not defined(…)
I am not sure why that is. The script is loaded on the end of the page, after foundation javascript has already been loaded.
If anyone can clear this up for me, I would appreciate it dearly. Thank you