grevory / bootstrap-file-input

Standardizes the file input field to look like a Bootstrap button in all browsers
Other
179 stars 63 forks source link

define plugin before domReady #27

Closed benfoxall closed 10 years ago

benfoxall commented 10 years ago

Currently the plugin definition is wrapped in $(function(){}) - which means that it won't be registered until the dom is ready, rather than when the file is executed.

This tripped me up a bit while I was using this plugin

grevory commented 10 years ago

I am not going to merge this particular pull request as the plugin still needs to be wrapped as a closure.

You have however raised a great point about this plugin waiting for the DOM before executing. I will fix this issue and reference it for you when it is done.

Thanks for bringing this to my attention. I wasn't even aware of this issue.

grevory commented 10 years ago

Check this out: https://github.com/grevory/bootstrap-file-input/commit/bf93e97d440ca4cb97f7990f4879c187c712128f

This should execute when you need it. Can you give this a try and see if it solves your problem? Thanks.

benfoxall commented 10 years ago

@grevory ace! That'll do nicely - I'll close this PR. Thanks.