//How to have two different inputs (one for mobile, one for desktop) modify the same variable?
Use :visible selector
username = $("input[name=userSearch]:visible").val(); $("input[name=userSearch]:visible") will be the visible input field.
Full Stack .NET Developer | Microsoft Architect
//How to have two different inputs (one for mobile, one for desktop) modify the same variable?
Use :visible selector
username = $("input[name=userSearch]:visible").val(); $("input[name=userSearch]:visible") will be the visible input field.
How useful was this post?
Click on a star to rate it!
Average rating 0 / 5. Vote count: 0
No votes so far! Be the first to rate this post.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?