CSS Issue

This topic contains 11 replies, has 2 voices, and was last updated by Jan Trier Jan Trier 7 years, 2 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #12905
    Jan Trier
    Jan Trier
    Participant

    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!

    #12923
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    The best possible way in my opinion is to use a custom CSS with a media query, something like this:

    @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;
      }
    }
    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #12938
    Jan Trier
    Jan Trier
    Participant

    Hey,

    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

    #12939
    Jan Trier
    Jan Trier
    Participant

    And your CSS Code isn’t working… :/

    #12940
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    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?
    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.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #12944
    Jan Trier
    Jan Trier
    Participant

    I 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! 😀

    #12983
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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.
    Before making any changes, make sure to have a back-up copy of your site, in case anything goes wrong.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


    #12984
    Jan Trier
    Jan Trier
    Participant

    Hey 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.
    #12987
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I 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 :)


    #12988
    Jan Trier
    Jan Trier
    Participant

    Thank 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 🙂

    Improve Search Bar results!

    #12989
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I 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 :)


    #12990
    Jan Trier
    Jan Trier
    Participant

    No problem, you’re welcome!
    See u

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.