-3

Need Help in trigger a button click event from another button click. am using jquery fileuploader which doesn't look great on my web site so i've hidden the file upload control and put another button on top of it. Now i need to provoke that button by clicking on the dummy fileupload button thanks.

3

2 Answers 2

2

You can use .trigger and target your buttons ID:

$("#idOfButton").trigger("click");

Or the shorthand, just call a click() on your target

$("#idOfButton").click();
Sign up to request clarification or add additional context in comments.

Comments

1

Try trigger()

$("#button").on('click',function(){
     $('#fileUpload').trigger("click");
});

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.