kartik-v / bootstrap-fileinput

An enhanced HTML 5 file input for Bootstrap 5.x/4.x./3.x with file preview, multiple selection, and more features.
http://plugins.krajee.com/file-input
Other
5.36k stars 2.4k forks source link

Initialize the plugin problem. #99

Closed mutli closed 9 years ago

mutli commented 9 years ago

Hello, frist i wont to say thanks for the plugin, it is almost perfect (for me drag and drop is unnecessarily) :) I am usit it with c#, alsmost finished, later i will implement jCrop.

My small problem:

For now i use it with jquery ajax get call, inside bootstrap modal. Problem is that it is Initialize the plugin on my page only firs time.Later i have plain browse button. Inside Table i have in each row button. Frist time on click it is initializing but after that it is not. Im am using Jquery to call fileinput on my control. Can u maybe help me with this, is there some option on plugin to Initialize again?

kartik-v commented 9 years ago

Its similar to how it was initialized earlier on document load.

You can initialize the plugin using javascript as described in docs and demos.

$("#input-id").fileinput({
    //options
});

You can also use refresh method of the plugin for changing/refreshing plugin options dynamically via javascript.