bbc / Imager.js

Responsive images while we wait for srcset to finish cooking
Apache License 2.0
3.84k stars 224 forks source link

Allow data-class attribute to be copied when replacing background image #115

Closed albertfdp closed 9 years ago

albertfdp commented 9 years ago

When a div where the background image is replaced, the existing classes were not kept.

thom4parisot commented 9 years ago

Well, the only altered attribute is the style one so I do see why your existing classes are not kept.

Do you rather mean that the gif.className is not added to the div?

albertfdp commented 9 years ago

Sorry, I was not clear: it is just consistency. I am replacing both placeholders and background images on the same page and I think that using the same convention would make sense.

thom4parisot commented 9 years ago

Yep you are right, it makes sense :-)

thom4parisot commented 9 years ago

Thank you @albertfdp!