SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question JQuery UI accordion

    Hi there,

    I am a developing an application which uses the UI Accordion and I was wondering whether there is a way to influence the minimum height of the accordion content because I am currently getting scrollbars appearing in certain browsers if I exceed a certain amount of content. Can I prevent this either in the JS or alternatively in the UI stylesheet?

    thanks

    SIlversurfer
    "Persistence is the path to perfection"

  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 can add a "no autoheight" option when you're creating the accordion. This will expand the accordion area depending on the content inside of it.
    e.g.:
    Code JavaScript:
    $( ".selector" ).accordion({ autoHeight: false });

    If you also want to make sure that the accordion doesn't push down other content, you could use the "no autoheight" option together with setting a height on the accordion content area:
    Code CSS:
    .ui-accordion .ui-accordion-content {
      height:200px;
    }
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }

  3. #3
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi thanks John I will give it a go,
    "Persistence is the path to perfection"


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
  •