• Resolved cag8f

    (@cag8f)


    Hello. I have created an SVG file with a simple mouse over animation ( it reduces the opacity of the image to zero, making it disappear). I have your plugin activated, and have imported the SVG file into WordPress. But I am having issues with the mouse over animation.

    If I directly access the file via its URL (link here), the mouse over animation displays as expected. But when I add the image to my WordPress the page via the WP editor, the image is displayed, but the mouse over animation does not function as expected (page here) (the only mouse over animation that occurs is the small opacity change that is part of my theme’s default behavior). I was under the impression your plugin would allow this animation to function as expected in this manner. Perhaps I am misunderstanding something?

    I’ve also tried to add the mouse over animation via another method–by with custom CSS (in my style.css file). But that doesn’t seem to work either. In my SVG file I’ve given the element an ID, which I’ve tried to use as a selector in style.css. But using Inspect Element, I don’t see that the element possesses the ID in-question.

    FYI I have added the image to the page via the following tag:

    <a href="http://kabultec.org/dev/wp-content/uploads/2017/10/test-with.svg"><img class="style-svg alignleft size-full wp-image-1366" src="http://kabultec.org/dev/wp-content/uploads/2017/10/test-with.svg" alt="" /></a>

    Thanks in advance.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Benbodhi

    (@benbodhi)

    Hi there,

    It looks like the theme you’re using is injecting a bunch of extra code… and the SVG is not rendered inline, so any styles you have in it, will not be used.
    Try just embedding like this:
    <img class="style-svg" src="http://kabultec.org/dev/wp-content/uploads/2017/10/test-with.svg" />
    or with a link to wrap it:
    <a href="#"><img class="style-svg" src="http://kabultec.org/dev/wp-content/uploads/2017/10/test-with.svg" /></a>

    I imagine you aren’t trying to add that link because it’s just the link to the media file itself, but if you wanted to link your SVG, that’s how you could do it.

    Thread Starter cag8f

    (@cag8f)

    Thanks for the reply.

    I tried embedding the image using the simple tag you suggested. But I had the same issue. You can see that new image on the same page (page here)–I added it after the original image.

    >> It looks like the theme you’re using is injecting a bunch of extra code… and the SVG is not rendered inline, so any styles you have in it, will not be used.

    I see that there is extra code. But why do you say it is from my theme? As a test, I switched to the default Twenty Seventeen theme, but I had the same issue.

    Thanks!

    Plugin Author Benbodhi

    (@benbodhi)

    That should totally work.
    Maybe if you could try deactivating all other plugins and using the twentyseventeen theme, then paste in the code I provided. If it still has an issue, there might be something going on at the hosting level.

    I thought the theme may be injecting extra image code, but I can’t be sure where it’s coming from to be honest.

    • This reply was modified 8 years, 7 months ago by Benbodhi.
    Plugin Author Benbodhi

    (@benbodhi)

    I’ve just downloaded your SVG and tested on a dev environment, it’s working fine:
    https://www.dropbox.com/s/tmt9w24s99spxhp/Screenshot%202017-10-29%2014.39.24.png?dl=0

    So there’s definitely something strange going on for you.

    Like I said, try deactivating all other plugins and reverting to the twentyseventeen theme, then test. If it works, then we know it was one of your plugins (since you have already ruled out the theme alone).

    Let me know how you go.

    Thread Starter cag8f

    (@cag8f)

    OK I switched to the Twenty-Seventeen theme and deactivated all plugins, but I’m still seeing the same issue: the <SVG> tag is still not appearing–only an tag (page here).

    Thoughts?

    There is nothing recorded in debug.log.

    • This reply was modified 8 years, 7 months ago by cag8f.
    Plugin Author Benbodhi

    (@benbodhi)

    I can see some other SVG files that are actually rendered inline including social icons… Not sure where they are coming from.
    Any chance you could shoot me temp admin login details? [email protected]
    I think I’ll have a better chance at helping you figure this out if I can see for myself.

    Plugin Author Benbodhi

    (@benbodhi)

    I can see that my plugin hasn’t loaded in the console. Doing a search for the inline JS file returns nothing.

    Thread Starter cag8f

    (@cag8f)

    >> I can see that my plugin hasn’t loaded in the console.

    My mistake. I had forgotten to keep your plugin activated :-/ But, I just activated it, and am experiencing the same issue. Test on your end again? In the meantime, I’ll send those admin creds.

    edit:

    >> I can see some other SVG files that are actually rendered inline including social icons… Not sure where they are coming from.

    This is interesting. If the issue was at the server level, I wouldn’t expect these SVG files to come through. Unless they’re rendered onto the page via a different method.

    • This reply was modified 8 years, 7 months ago by cag8f.
    Thread Starter cag8f

    (@cag8f)

    OK, with your offline help, I see that the issue was user error. The user in-question (me) did not have “Advanced Mode” enabled in your plugin. Once done, the issue was resolved.

    Thanks!

    Plugin Author Benbodhi

    (@benbodhi)

    Glad we got there, thanks for your support 🙂

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Animation does not display as expected’ is closed to new replies.