jQuery Mobile: Collapsible Expanded

This entry is part 27 of 73 in the series jQuery Mobile

In jQM collapsibles, you can have the content expanded as a default.

This is done by using the attribute¬†data-collapsed=’false’.

<!DOCTYPE html>
    <link href='http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.css' rel='stylesheet'/>
    <script src='http://code.jquery.com/jquery-1.10.2.min.js'></script>
    <script src='http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js'></script>
<div data-role='page'>
    <div data-role='header'><h1>Collapsible</h1></div>

    <p>Collapsible Expanded</p>

    <div data-role='collapsible' data-collapsed='false'>
        <ul data-role='listview'>
            <li><a href='#'>List item 1</a></li>
            <li><a href='#'>List item 2</a></li>
            <li><a href='#'>List item 3</a></li>

    <div data-role='footer' data-position='fixed'>
Try The Code

The list has a href which is supposed to be a link and so it will automatically create a > arrow on the right hand side of the list.

Series Navigation<< jQuery Mobile: Collapsible with 2 themes
jQuery Mobile: Icons For Collapsible Set >>