• Resolved Zoker

    (@zoker)


    Hi there,

    I’m using visual composer and I would like to use this plugin, too.
    I know that I need to add the class to the img element itself, but why is it not possible to add the class to a higher element?

    Like a wrapping element and then catch it via .style-svg img ?

    Or is that technically impossible?

    Thank you!

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

    (@benbodhi)

    Hello,

    Unfortunately that’s not possible at the moment. But you can use it with visual composer still though.

    Thread Starter Zoker

    (@zoker)

    For people who need the same:

    And just add .style-svg-container to the image element class field

    Plugin Author Benbodhi

    (@benbodhi)

    Does that work swapping the IMG tag with inline SVG code?

    The only reason you need to use the class at all is if you want to render your SVG code inline… It’s not needed at all if you just want to use your SVG files like any other image.

    I’d be interested to hear if that actually works to swap out the IMG tag.

    Thread Starter Zoker

    (@zoker)

    Yes it works. I just adjust the jquery selector to also look for img inside a style-svg-container element.

    And since I want the inline svg replacement to style the svg element, that works fine for me ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Get elements by wrapping class’ is closed to new replies.