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">
    <head>
        <script src="svg-injector.min.js"></script>
        <!-- Rest of HTML HEAD comes here, including Reveal.js boilerplate -->
    </head>
    <body>
        <div class="reveal">
            <div class="slides">
                <section>
                    <h2>Mission (Im)possible: Making round toast</h2>
                    <img src="generated-diagram.svg" data-image-type="svg">
                </section>
            </div>
        </div>
        <script>
        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
                markedElements[i].classList.add("fragment")
            }
        }
        // Elements to inject
        var svgDiagrams = document.querySelectorAll('img[data-image-type="svg"]');
        // Do the injection
        SVGInjector(svgDiagrams);
        </script>
    </body>
</html>

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).