drewbrolik / Responsive-Img

Responsive Img is a jQuery plugin that changes an image's src attribute based on its container's width.
207 stars 36 forks source link

Support for css background images #3

Closed reblutus closed 11 years ago

reblutus commented 11 years ago

I noticed that your library only support img tags. Are you planning to add this to css background images?

drewbrolik commented 11 years ago

I would definitely consider that if enough people want it.

The reason I haven't done it yet is that it might be fairly complex, and I thought it'd be smarter to keep the plugin simple.

I do see a use for switching background images, though, and if you're saying you'd be interested in something like that, I'd look into building it in.

reblutus commented 11 years ago

I think it would be a good idea because background images are often much larger than "in page" images. Indeed by looking at your code, you would need to refactor quite a bit. I will look into the details and submit you something later.