jquery make new variable with dynamic name
var vars = {};
var newCount = 0;
$('.hello').click(function(){
newCount++;
vars['hello' + newCount] = '<p>Hello World</p>';
console.log( JSON.stringify(vars) );
});
Also in JavaScript:
- angular 9 mat textbox
- angular get firebase firestore
- scrollspyNav react
- jquery how to detect click outside off-canvas-navigation
- jquery select by name
- js change canvas resolution
- vuetify change text color of radio button
- toggle class javascript and jquery
- how to make a vowel counter in javascript
- check for duplicates in array javascript
- single node elasticsearch with enable security basic in docker
- load js
- post antiforgerytoken jquery
- call json api javascript
- how to check leap year in javascript
- javascript 1 + "1"
- for function js
- print json shopify
- get parent element using jquery
- rxjs que recibe como parametro un observable
- chrome extension detect second monitor
- datetime to date javascript
- how to put react compnent to bottom
- sass variables across files