Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

diglactic/webflow-utils

Open more actions menu

Repository files navigation

webflow-utils (wut)

⚠ This library is currently in an experimental phase and is expected to have numerous breaking changes. Use at your own risk.

Installation

<script src="https://unpkg.com/@diglactic/webflow-utils@VERSION/dist/webflow-utils.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@diglactic/webflow-utils@VERSION/dist/webflow-utils.css">

Usage

WebflowUtils and wut are both valid ways to access this library. Make sure you place this code after the installation code above.

<script>
    wut.ready(function () {
        //
    });

    wut.ready(function () {
        var youtubeEmbed = document.querySelector('.youtube-embed-selector');

        wut.youtube.play(youtubeEmbed);
        wut.youtube.pause(youtubeEmbed);
    });

    wut.ready(function () {
        var tabsComponent = document.querySelector('.w-tabs');

        wut.tabs.onTabChange(tabsComponent, function (newTabName) {
            alert('Tab changed to ' + newTabName);
        });
    });
</script>

Development

npm install
npm run build

Publishing

Don't manually tag your commits! The following will handle that.

npm run build
npm version patch|minor|major
npm publish

© 2022 Diglactic, LLC

Packages

 
 
 

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.