rvera / image-picker

Image Picker is a simple jQuery plugin that transforms a select element into a more user friendly graphical interface.
http://rvera.github.com/image-picker
Other
906 stars 216 forks source link

Adding generation of custom 'class'-tags in div and img #44

Closed poikilotherm closed 7 years ago

poikilotherm commented 9 years ago

I wanted to style the image picker with some classes within css.

There was no option to add custom classes to the div or img element generated by jQuery, so I added the tag 'data-img-class' to be used for that.

I hope this is of use for others, too. Would be glad if you accept this PR. Thanks!

rvera commented 7 years ago

This is a good idea, due to some conflicts I can't merge this but I added this on 0.3.0 and gave you credit for the good idea!

kevinwheeler commented 7 years ago

Is anyone else having issues with this not working? I am using version 0.3.0 via bower. data-img-src works fine, but data-img-class does nothing.

rvera commented 7 years ago

Hi Kevin, maybe the bower version is wrong?

Check the demo page http://rvera.github.io/image-picker and look at the options

screen shot 2016-10-18 at 5 33 04 pm

It produces the expected result

screen shot 2016-10-18 at 5 33 17 pm
hariag commented 7 years ago

Hi, kevinwheeler, tried use image-picker.js instead of image-picker.min.js and it is working. I guess image-picker.min.js not updated yet.

rvera commented 7 years ago

uh, that's weird. Thanks @haria will take a look at that.