SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2011
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Show other background onclick

    Hi,

    This is the website: coiffurestefan.be/wp

    I'd like the "openingsuren" at the bottom to have the X when opened and the arrow when closed. How can I do this? I tried with CSS but it doesn't work like I want it to be.

    Any advice?

  2. #2
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    You could toggle an "active" class on the link, similarly to how slideToggle() will toggle open the "openingsuren" div, toggleClass() can toggle a class.

    Having has a quick look at your code I think you'd only need to add a small bit of code to the line that currently does your slideToggle()

    Code:
        jQuery(this).toggleClass("active").next("#openingsuren").slideToggle(500);
    Then you can change the CSS rule for the active state to be:
    Code:
    #uren .heading.active
    Hope this helps
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2011
    Posts
    86
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks! This works like a charm.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •