Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Delay on mobile compact search › Reply To: Delay on mobile compact search
September 23, 2025 at 12:17 pm
#55559
Keymaster
I may not need access though. I have a much better solution for your case.
The issue is that the width is not taken into account as it is determined by user agent. However if you want to display the search bars based on the device width, then using a custom CSS will be a better solution.
1. Make sure to enable both search bars for all devices.
2. Use this custom CSS to hide them based on the device width:
@media screen and (min-width: 769px) {
.asp_w_container_1 {
display: block !important;
}
.asp_w_container_2 {
display: none !important;
}
}
@media screen and (max-width: 768px) {
.asp_w_container_1 {
display: none !important;
}
.asp_w_container_2 {
display: block !important;
}
}
This will hide the compact search when the screen is < 768px and vice versa.