1

So I am just trying to give a basic idea of what I want to develop for a friend where the letter "M" (his logo) gets drawn out like its on a whiteboard.

I am trying to use Vivus to animate the SVG.

<!DOCTYPE html>
<html>
<head>
    <title>MARKUR | MUSIC</title>
<link rel="stylesheet" type="text/css" href="index.css">
<script src='bower_components/jquery/dist/jquery.js'></script>
</head>
<body>
    <div id="content">
        <div id="container"> 
            <!--<object type="image/svg+xml" data="img/markur.svg" id="markurLogo">Your browser does not support SVG</object>-->
        </div>
    </div>
    <script src="bower_components/vivus/dist/vivus.js"></script>
    <script>
        var myVivus = new Vivus('container', {type: 'oneByOne', start: 'autostart', duration: 200, file: 'img/markur.svg'});
        myVivus.play(2)
    </script>
</body>
</html>

On the site I am able to get the SVG to display so I know I got something right however the error only appears when I try to call one of the functions.

enter image description here

On further inspection, I see that it's part of the Vivus code:

enter image description here

It says it is undefined so do I have to define the length somewhere in my code? I am not using a webserver for this at the moment but will it have something to do with this? Thank you for any form of help.

John Slegers
  • 45,213
  • 22
  • 199
  • 169
Lewis Menelaws
  • 1,186
  • 5
  • 20
  • 42
  • You don't need to define length anywhere.. Basically the error means that the _element cannot be found_.. i.e. **length of undefined element** cannot be fetched – Guruprasad J Rao Sep 23 '15 at 03:57
  • @GuruprasadRao So can I get this to work even with this error? – Lewis Menelaws Sep 23 '15 at 04:24
  • No you cannot I guess.. basically this will stop execution of that particular action what it was doing.. You might be missing something here.. A demo fiddle would be much helpful.. – Guruprasad J Rao Sep 23 '15 at 04:25
  • @GuruprasadRao Do you think this will be an error with the call to the function? – Lewis Menelaws Sep 23 '15 at 04:35
  • I cannot confirm you anything on this since the picture of problem here is not clear.. There might be n number of reasons for this kind of errors to occur. That's why I asked for problem demo in **[jsfiddle](https://jsfiddle.net)** if possible.. – Guruprasad J Rao Sep 23 '15 at 04:40

0 Answers0