WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Add HTML lazy classes to existing node classes

[Resolved] Add HTML lazy classes to existing node classes

  • Hi!

    In the generated HTML, there’s a problem caused by the plugin.

    If the image which is lazy loaded already has some HTML classes, BJ Lazy Load won’t add its own classes to them, but will duplicate the class element.

    I.e.:

    <img class="lazy lazy-hidden" class="avatar tiny" alt="" src="http://url.com/wp-content/plugins/bj-lazy-load/img/placeholder.gif" data-lazy-type="image" data-lazy-src="http://url.com/img.jpg" />
    <noscript><img alt="" src="http://url.com/img.jpg" class="avatar tiny" /></noscript>

    Ideally, you’d want BJ Lazy Load’s own classes to be added to the existing classes. This would resolve many HTML validation errors and be more logical 🙂

    Thanks in advance for your help!

    Best xx

    Marie

    http://wordpress.org/extend/plugins/bj-lazy-load/

Viewing 4 replies - 1 through 4 (of 4 total)
  • I have somekind of an opposite problem, basically enabling bj lazy loading removes all the custom classes the images have and leave only the lazy load classes!

    Plugin Author Bjørn Johansen

    @bjornjohansen

    Terribly sorry I didn’t see this post until now. BJ Lazy Load should indeed add its classes to the existing ones – at least it used to, so it must have broke at some point. I will investigate this and see what I can find.

    Any idea about the problem, Bjørn? It’s blocking a major release of mine, and I’m definitely willing to donate if you can fix the problem soon. Many thanks in advance! 🙂

    Plugin Author Bjørn Johansen

    @bjornjohansen

    Sorry it took so long. Have been super busy.

    Just released version 0.6.9 where this should be fixed now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] Add HTML lazy classes to existing node classes’ is closed to new replies.