Created
March 5, 2021 11:32
-
-
Save shubham-99fusion/319aed3ec9c30299090beee6bf652a2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('wp_enqueue_scripts',function(){ | |
?> | |
<script> | |
document.addEventListener('unit_loaded',function(){ | |
document.querySelectorAll('.flowplayer').forEach(function(element){ | |
flowplayer(element,JSON.parse(element.getAttribute('data-item'))); | |
}) | |
}); | |
</script> | |
<?php | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment