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

Dependency on version of jQuery #32

Closed marsanyi closed 8 years ago

marsanyi commented 10 years ago

Doesn't work with jQuery 1.4.2; does with jQuery 2.1.0.min; documentation update?

rvera commented 10 years ago

Good idea, will do as soon as I have some free time.

Have you tested other versions?

garygreen commented 9 years ago

+1. I've just been debugging a weird error for ages, turned out to be this plugin code responsible:

thumbnail.click({
    option: this
}, function(event) {
    return event.data.option.clicked();
});

Such a strange syntax, is this v2.1.0 style context? I changed it to the following, works fine. .proxy has been around since jQuery 1.4.

thumbnail.on('click', $.proxy(function() { return this.clicked(); }, this));
rvera commented 9 years ago

@garygreen can you explain a little what issues were you seeing?

garygreen commented 9 years ago

@rvera honestly, I haven't got a clue what was happening but when it hit that bit of code it was executing some other js parts of my app, completely unrelated to image picker. I've never seen that syntax used before (passing object of options to the click event listener).

rvera commented 8 years ago

Will close this for now, since I can't pinpoint the error. Might be fixed on the newest version.