Skip to content

Instantly share code, notes, and snippets.

@vejnoe
Forked from danro/webflow-resize.js
Created March 26, 2020 09:16
Show Gist options
  • Save vejnoe/db4cc109c76b06c2abaa687e6dedd9ef to your computer and use it in GitHub Desktop.
Save vejnoe/db4cc109c76b06c2abaa687e6dedd9ef to your computer and use it in GitHub Desktop.
Webflow.js resize example
var Webflow = Webflow || [];
Webflow.push(function () {
// Find example element
var $element = $('.resize-demo');
var $parent = $element.parent();
// Listen for optimized resize event
Webflow.resize.on(function () {
// Do something with element on resize
$element.height($parent.height());
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment