• I’m using a repeater custom field (from the advanced custom fields plugin) to dynamically populate the page below with collapsible content (click a thumb to the left to reveal each portfolio).

    However, I’m trying to figure out how to make the first thumbnail expanded on page load so that the middle area isn’t just blank white.

    I’m not using shortcodes (it’s all coded in the template file) so ‘expanded’ won’t work as a shortcode attribute.

    I tried doing this with CSS but the dynamic inline display styles overwrite it.

    http://dev.pchi.com/portfolio/

    http://wordpress.org/plugins/jquery-collapse-o-matic/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Baden

    (@baden03)

    you are not using shortcodes, so you are using the roll-your-own method (just html and css), correct?

    While you are looping through your thumbnails, you could just add an extra class to the first element. That class would be: colomat-close.

    Let us know if that works for you.

    Thread Starter bsmalldesign

    (@bsmalldesign)

    Thanks! I added the class and it worked great (displayed all at the beginning because I just added to the loop template to test it), but I don’t know how to make it so it only appends to the first item/child. Do I need jquery or something for that? Sorry I’m not that code savvy.

    I have the same issue, would like the first tab to be open (expanded) upon opening the page. I used expanded=”true”, which didn’t work. Then I used the class mentioned above, but it didnt work either

    [expand title=”Villa Details” class=”colomat-close” rel=”villa-highlander” swaptitle=”Close”]

    Is there any CSS I can/need to apply to have the class open?

    http://grenadasvillas.com/villa-amarillo/
    It might not be visable, I am still working in Maintenance mode

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Expand First Item by default’ is closed to new replies.