force click btn using jquery
example:
<button id='testButton'>Test</button>
<script>
$(function(){
$('#testButton').on('click' , function(){
alert("I've been clicked!");
});
//now on another event, in this case window resize, you could trigger
//the behaviour of clicking the testButton?
$( window ).resize(function() {
$('#testButton').trigger( "click" );
});
});
</script>
Also in JavaScript:
- how to calculate average of array in javascript
- js onclick open the phone application
- js add data in object
- javascript palindrome
- js array map skip element
- update one component from another component angular 9
- multiple line string in jquery
- external css not working in jsp
- smaler div on devices
- discord js stats command
- scraping google nodejs
- javascript check if key exists in object
- how to add script before </body> in magento 2
- how to find element in array angularjs
- jquery clear file input
- how to compare strings in javascript ignoring case sensitive
- js validate hex hash
- get window height javascript
- js strings
- generate random password
- regex for lowercase letters js
- how to remove duplicate array object in javascript
- how to get the video time every second after
- how display same paragraph in all pages of website in js