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
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
i passed it like this, i get the output as undefined
that probably just means it can't find anything with the class
minipop
on iton first console.log i got the element, after passing it to to 2nd function it shows undefined
I think your parens are mismatched.
popUpElement
is getting passed as a second argument to find, not to your own functionno its not mismatched, first parms is 'data' second is 'element'
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
ohh got it, its working fine now
thanks
both were in same parms