Hello, im very new and trying to hide/show some divs depending on user input on a textbox. Here is the UI:
name of textbox - inp_hide_search
condition of textbox on showing first name div - inp_hide_search.value.contains(‘f’)+inp_hide_search.value.contains(‘i’)
Example scenario:
- user will input f or i and it will show the first name div
- but when im changing the condition to inp_hide_search.value.contains(‘first’), it does not show if i enter only f or i or r or s or t. I’m thinking to change it to an array but contains only accepts Text types
- it will work fully if i change to this condition : inp_hide_search.value.contains(‘f’)+inp_hide_search.value.contains(‘i’)+inp_hide_search.value.contains(‘r’)+inp_hide_search.value.contains(‘s’)+inp_hide_search.value.contains(‘t’)
- but it is too long and not a good practice, is there anyway to compress this?
Thanks!