trigger send parameter
$('body').trigger('this_works', [{data: [1, 2, 3]}, 'something']);
$('body').on('this_works', function (event, json, string) {
// parameter is stocked in json.data here.
console.log(event, json, string);
});
Also in JavaScript:
- ES6: Use class Syntax to Define a Constructor Function
- promise catch javascript
- react Refused to execute inline script because it violates the following Content Security Policy directive
- create angular project
- use thymeleaf variable in javascript
- how to write html with javascript
- plyr for react js
- state management in react
- javascript location href redirect
- react js text input with icon
- js query string
- can't bookmark react router
- javascript pop first element
- react 17 hot reload not working
- javascript convert float to int
- selection sort javascript
- jquery append table row
- monk remove
- how to keep scrolling with javascript
- javascript padstart
- javascript is not null
- jquery typeof undefined
- javascript array map stack
- js array includes