+ 1
I have a doubt on using jQuery variables.
let divE = $('div'); In jQuery, we know that the variable div, will have a DOM element in it! But what is the correct way of accessing the variable later in code? 1. $(divE); 2. $divE; 3. $.divE;
3 Respuestas
+ 1
Just divE. Exactly as you declared it with the let statement.
+ 1
So if I want to get the text of div element, should I have to write divE.text()?
0
Yup.