Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › CSS Issue
This topic contains 11 replies, has 2 voices, and was last updated by Jan Trier 7 years, 4 months ago.
- AuthorPosts
- April 28, 2017 at 4:58 pm #12905
Hey,
I want to set the size of the front from my Ajax search to 16px at all mobil devices where the width is smaller then 500px…
How can I do that?
Greetings and Thank You!
May 1, 2017 at 8:39 am #12923Hi!
The best possible way in my opinion is to use a custom CSS with a media query, something like this:
Best,@media only screen and (max-width: 500px) { input.orig, input.autocomplete { font-size: 16px !important; } input.orig::-webkit-input-placeholder { font-size: 16px !important; } input.orig::-moz-placeholder { font-size: 16px !important; } input.orig:-ms-input-placeholder { font-size: 16px !important; } input.orig:-moz-placeholder { font-size: 16px !important; } }
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 1, 2017 at 11:32 am #12938Hey,
Thank You!
And is it possible to call a class by the first char a user has typed?
I want to call: class=”spu-open-58189″Greetings
May 1, 2017 at 11:34 am #12939And your CSS Code isn’t working… :/
May 1, 2017 at 12:08 pm #12940Hi,
The CSS code is working, I just checked your site, it is active: https://i.imgur.com/wexJezy.png
Make sure to clear all layers of cache, including browser, site, server, CDN etc..And is it possible to call a class by the first char a user has typed?
Best,
Can you please be more specific about this? Where do you want to add this class, which element? Do you want to add it to an element whenever at least 1 character was entered?
It is possible I guess, but only with a custom script. But I need to know which element is affected.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 2, 2017 at 2:04 pm #12944I have a plugin which can show/trigger popups. The trigger to show that popup is: class=”spu-open-58189″
For example: <button class=”spu-open-58189″>Submit</button> Would trigger and show the popup.You can just check out my sidebar at the right hand side of a product page and click on a button like this. Then a popup opens.
Now I want to trigger another popup which comes every time a user enters the first char.The cookie should handle that the popup doesn’t get triggered the next time if a user searches the next time. (If not, is it possible to create that by the Ajax search with the cookie and next time don’t popup?)
That is what I want to do! 😀
May 5, 2017 at 2:58 pm #12983Hi!
I understand, and I believe it is possible. There is a javascript API available with the plugin, which allows executing functions on certain events, you can read more about it here: Ajax Search PRO javascript API
The simplest solution in my opinion is this, place it into the functions.php file in your active theme directory (copy from line 3):
Please note that this is out of the scope of support, so I can’t promise this code will work in every situation out there.
Best,
Before making any changes, make sure to have a back-up copy of your site, in case anything goes wrong.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 5, 2017 at 3:21 pm #12984Hey Ernest,
Thank you for you greate support! – I understood your code. And it is working! – Thank You!
But there is one little issue. The plugin “Popups” set a cookie so it knows the next time the user comes to the website, if the trigger should be triggered or not. Do you have an idea how I can add that to the if condition?I think the plugin works like this:
The plugin sets a cookie with a expire date. If the cookie is still alive, the popup doesn’t get triggered!
If not, the popup gets triggered.Independent of the user got subscribed or not, I think it is okay to check of there is a cookie with the name spu_open_58189 or not. The value is not necessary – Because I want to show the popup again if the user hasn’t subscribed. That is the reason, why the popup will be shown again after 10 days.
In the attachment you will find two pictures. One of the cookie where the user got subscribed and one where the user doesn’t got subscribed!
Thank You!
Attachments:
You must be logged in to view attached files.May 5, 2017 at 4:46 pm #12987I see, it sets a cookie, so it’s not displayed multiple times over the 10 day period.
In that case, this should be the final solution:
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 5, 2017 at 4:57 pm #12988Thank You a lot Ernest! – This solved my problem! 😀
Could you maybe also respond to this ticket? – I still didn’t recived any answers… :/
And I think, your are one of the best supporters. Thats the reason, why I ask you 🙂May 5, 2017 at 5:01 pm #12989I will of course, as soon as I can today 🙂 And thank you for your kind words!
There are lots of tickets open (this, and on another system + mails as well), and I want to answer everything thoroughly, it takes some time 🙂 Sorry for the delays.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
May 5, 2017 at 5:01 pm #12990No problem, you’re welcome!
See u - AuthorPosts
You must be logged in to reply to this topic.