1

i have a list of input files, which is kept hidden from the user. there is a button and on clicking the button the file input get trigged. this button and list of hidden form controls are render on a modal window. on first time its working properly but after saving the data the modal get closed and again i tried adding files the click event is triggered twice. on first selecting the file and select, te file browse come again to select. the code is give below.

this._control.button.name = '#fileselector';
....
this._current.fileControl = $('.file-0');
...

$(document)
    .on('click', this._control.button.name, function(event) {
                self._current.fileControl.trigger("click");
            })
    .on()....

1 Answer 1

2

Try unbinding the click event like this

$("#buttonid").unbind('click').click(function (e) {    
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.