mtkopone / zelect

From <select> to something more 2012
Do What The F*ck You Want To Public License
395 stars 42 forks source link

triggerChange on initializing #10

Open joaovpmamede opened 11 years ago

joaovpmamede commented 11 years ago

https://github.com/mtkopone/zelect/blob/master/zelect.js#L89

Is this really necessary? I was using your plugin on a backbone app and I'm not sure if it's my poorly written code (probably is) but whenever the plugin runs it would trigger a change event...that would mess with my view and app state because it would fire a handler that I'd set before.

mtkopone commented 11 years ago

I think the line number isn't matching what you're trying to describe anymore.

I think it would be OK to make the initial change event optional, by providing something like initialChange:false in the opts?

Will look at this next time I get a chance.