+ 8
[SOLVED] Onclick not working
https://code.sololearn.com/WA5A7a16a102/?ref=app When we click at the box in the app it works perfectly But when we try to run the same code on laptop (website) it doesn't work :(
10 ответов
+ 2
David Dolejší It appears that SL is using the IIFE (website only) to solve the problem you were referring to in your first response to this post, but doing so has caused Namit Jain [INACTIVE] issue/bug where the function func is not globally scoped as it would normally be without the IIFE, see Sofi (DM Closed❌) 's code. Another way to solve this is to use a function expression instead of function declaration, ex window.func = function(){...}.
+ 10
Is it working now?
https://code.sololearn.com/WWdXvavSbp3N/?ref=app
+ 5
Namit Jain [INACTIVE] welcome😁
+ 3
Thank you so so much Sofi (DM Closed❌) 🙏🙏
I have been stuck on it for more than 2 hours. And now it's working perfectly 😃
+ 3
Ohh, I should have elaborated my question better.
But Sofi (DM Closed❌) understood the problem and came up with the solution
Thanks to her again :)
+ 2
Yeahh same :(
+ 1
Ohh I see 🧐🤔
Thanks for that! 👍✌
+ 1
ODLNT that worked! Thank you so much✌:)
I wish we had the option to mark 2 answers as best...
+ 1
Namit Jain [INACTIVE] wlcm again😆
- 1
Itha konjam soldra punda