1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.1 Need help about add css to 2 div when hover

Discussion in 'XenForo Questions and Support' started by Fatih Özcan, Jan 28, 2013.

  1. Fatih Özcan

    Fatih Özcan Active Member

    I want add css to 2 div when i hover, demo when normal ( no hover)


    and when i hover to add "Aj" to css on 2 div

    Thanks you so much, i use xenforo 1.1.2 :)
  2. Chris D

    Chris D XenForo Developer Staff Member

    For what purpose, exactly?

    With CSS you can just use the :hover selector...

    Something like:

    .F9a div:hover
     color: red;
    That would basically turn any text in a div element within the .F9a parent class red.

    So that should enable you to do whatever hover based effects you need.

    If you DO actually need a class appending automatically on hover (again, why?) then that would require some custom jQuery/JavaScript and is therefore probably beyond the scope of this forum unless you find a developer who is familiar with jQuery and javascript.
    Fatih Özcan likes this.
  3. Fatih Özcan

    Fatih Özcan Active Member

    i want when i hover to class yAw then on 2 div below will add class "Aj" , i want make a navigation like gg+
    you can see demo at that :)
  4. Chris D

    Chris D XenForo Developer Staff Member

    What will class Aj do?

    You might be able to do what you need with the :hover selector.
  5. MagnusB

    MagnusB Well-Known Member

    Use addClass and removeClass with jquery. I still don't understand why you need to change class if you are using a hover event anyway you can just use :hover.
    Chris D likes this.

Share This Page