Demo entry 6632834

blog sample


Submitted by anonymous on Jul 30, 2017 at 22:12
Language: HTML. Code size: 1.2 kB.

<!doctype html>
<html lang="en">
        <script src="svg-injector.min.js"></script>
        <!-- Rest of HTML HEAD comes here, including Reveal.js boilerplate -->
        <div class="reveal">
            <div class="slides">
                    <h2>Mission (Im)possible: Making round toast</h2>
                    <img src="generated-diagram.svg" data-image-type="svg">
        function addFragmentClass(svg) {
            // Find all elements in the SVG whose `id` begins with `"step"`
            var markedElements = svg.querySelectorAll('[id^="step"]');
            for (var i = 0; i < markedElements.length; i++) {
                // for each such element, add the "fragment" class that Reveal.js
                // will use to control how/when the element displays
        // Elements to inject
        var svgDiagrams = document.querySelectorAll('img[data-image-type="svg"]');
        // Do the injection

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).