Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #751572
    alelingo
    Participant

    HI,

    Im trying to make containers with hover, so when mouse-over it, looks like in the picture attached.

    URL: http://precisionairparts.com

    How can I get that effect?
    Have been trying with no success, please help!

    Thanks,
    Ale

    #751918
    Friech
    Moderator

    Hi Ale,

    Thanks for writing in! Which container are you referring to? You can add this under Custom > JavaScript in the Customizer.

    jQuery(document).ready(function($){
    $('.home #x-section-2').hover(
           function(){ $(this).addClass('container-hover-state') },
           function(){ $(this).removeClass('container-hover-state') }
    )
    });

    Then add this on your Custom CSS

    .container-hover-state {background-color: #CA5C12 !important;}

    This effect will only apply on your home page second section. You can assign a class to your containers and replace the .home #x-section-2 with that class.

    Hope it helps, Cheers!

    #753290
    alelingo
    Participant

    Hi Staff,

    I added a raw content with a container short code inside, its the yellow one on the bottom “News” webpage.

    But that didn’t work, even though I changed the class :(.

    Can you help me?

    Thanks,
    Ale

    #753616
    Jade
    Moderator

    Hi Ale,

    Sorry for the confusion.

    If you are simply wanting to add a hover effect to a section, you can do it by adding css hover state for the sections like:

    #x-section-2:hover {
        background-color: #000 !important;
    }

    If you’re not able to determine what the correct ID name of the section is, you can add you custom ID in Cornerstone for the specific section. Just make sure that the ID matches the CSS selector.

    Hope this helps.

  • <script> jQuery(function($){ $("#no-reply-751572 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>