Javascript Plugin Conflict

4 replies · opened Jun 8, 2016

NnickwildJun 8, 2016

Hi,

I want to use DrawFill SVG javascript plugin (https://github.com/callmenick/Draw-Fill-SVG) to animate an svg logo whilst pages load. This animation works works fine outside of canvas but I get an error using in canvas. I have included the modernizr dependency, but this still throws an error -

TypeError: Modernizr.prefixed is not a function. (In 'Modernizr.prefixed("transition")', 'Modernizr.prefixed' is undefined)

Do you have any thoughts please. My website is spaces2020.com.

Thanks

Nick

SSemicolon WebSTAFFJun 9, 2016

Hello,

Firstly, we see a Serious Issue with your Code. Please find the following code in the Page:

data-loader-html="
       
    

    

    

"

and replace it with:

data-loader-html='
       
    

    

    

'

Secondly, do make sure that you add the modernizr JS Linking and any other Javascript Plugin Linking at the bottom of the Page just before the js/functions.js JS File Linking.

This should automatically fix your issue. Let us know if we can help you with anything else or if you find any further issues.

NnickwildJun 13, 2016

Hi,

Many thanks for your advice. It now shows the logo during, without the errors but it just shows the SVG file and does not perform the drawfillsvgfunction (I have included the demo at spaces2020.com/test that works).

Do you have any further advice?

Many thanks

Nick

SSemicolon WebSTAFFJun 15, 2016

Hello,

We have checked out your Website and the issue was that you are Calling the DrawFillSVG Function before it is initialized in the Footer. Additionally, the Initialization JS Code for the DrawFillSVG Function should be placed inside the jQuery Document Ready Function. We have created a Sample Template for your use which is working fine for us: https://www.dropbox.com/s/bzy1v6ei8pwz3zu/draw-svg-example.html?dl=1 .

This should definitely work fine. Let us know if we can help you with anything else or if you find any further issues.

NnickwildJun 15, 2016

This great thanks. Excellent customer service!

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard