I am using following code in static page, which is working fine. But how can I solve the issue to avoid duplication of code in dynamic pages.
if( $w(“#myElement”).value === “1” )
{ $w(“#myElement2”).show(); }
else
{ $w(“#myElement2”).show(); }
This code is about user input, I am not using wix forms.
If I use this code in dynamic pages, this will be applied to all pages.
What can be done to solve this issue. I have to configure value in the input box.