Hello
I want to make a button autoclick itself. JQuery?
Whats the best way?
Tried trigger click but nothing
Thanks
Hello
I want to make a button autoclick itself. JQuery?
Whats the best way?
Tried trigger click but nothing
Thanks
jQuery trigger is a viable option... can you provide the relevant code? maybe something else is preventing the trigger from working?
Can you also explain why you need to do this as there may be a better way to do this.
The basic ways are:
With jQUery: $("#buttonID).click();
Only JS: document.getElementById('buttonID').onclick();
If you want to learn more and do a nice implementation read this article:
http://jehiah.cz/a/firing-javascript-events-properly
why we need self clicbale button? It's not good Desgin as far user as well as website is concern. If you want some hidden action then do that there no need of self clickable button.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.