• Resolved viewup

    (@viewup)


    The plugin removes other CSS classes. If i insert the selector class plus another, all classes will be removed.

    Can the plugin preserve other classes and remove only the one it targets?

Viewing 6 replies - 16 through 21 (of 21 total)
  • Your plugin could intercept this SVG plugin, store the classes as e.g. data-attribute and then retrieve them afterwards and append them to the classes of the new element. This would require some HTML parsing though.

    Plugin Author Benbodhi

    (@benbodhi)

    I’ve added this to the list of possibilities for future updates. I haven’t had much time for this plugin lately unfortunately. Hoping to dedicate some solid dev time to it very soon though.

    Thread Starter viewup

    (@viewup)

    Your plugin could intercept this SVG plugin, store the classes as e.g. data-attribute and then retrieve them afterwards and append them to the classes of the new element. This would require some HTML parsing though.

    @strarsis i will try that but i think the plugin will remove html attributes too.

    @benbodhi is there an JS method to parse an element to SVG? maybe i can only use the JS for your plugin. Are you using an library?

    Plugin Author Benbodhi

    (@benbodhi)

    Honestly, I think the best thing would be to just leave that setting off in my plugin. But if you wanted to work on that, all my JS is in one file so you can look over it easily.

    Thread Starter viewup

    (@viewup)

    I integrate with your plugin forcing the setting and the class name, this way they will work together.

    Plugin Author Benbodhi

    (@benbodhi)

    Sounds good. I’ll be interested to have a play with it once you’re finished.

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Preserve other CSS classes’ is closed to new replies.