Pass value on function

Here in this code I want to pass the value of popUpElemt on line no 221 to the above function updateMiniPopUpContent, how can I do this
8 Replies
Jochem
Jochem17mo ago
not sure I understand your question. Just pass it in? add an argument to the function declaration and pass the value you want into the function
Aldrin
AldrinOP17mo ago
i passed it like this, i get the output as undefined
Jochem
Jochem17mo ago
that probably just means it can't find anything with the class minipop on it
Aldrin
AldrinOP17mo ago
on first console.log i got the element, after passing it to to 2nd function it shows undefined
Jochem
Jochem17mo ago
I think your parens are mismatched. popUpElement is getting passed as a second argument to find, not to your own function
Aldrin
AldrinOP17mo ago
no its not mismatched, first parms is 'data' second is 'element'
Jochem
Jochem17mo ago
the color on the opening parens for data is the same as the closing parens after popupelement that means that's a matched pair also, you open updateMini... on its own line, then close it on the line below data and popupelement, while there is also a parens after popupelement
Aldrin
AldrinOP17mo ago
ohh got it, its working fine now thanks both were in same parms
Want results from more Discord servers?
Add your server