jQuery Mobile: Collapsible with 2 themes

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

jQuery Mobile provides two themes, theme a and theme b.

In this example, we use 2 themes to separate out the the header and the content.

<!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 With Themes</p>

    <div data-role='collapsible' data-theme='b' data-content-theme='a'>
        <p>I'm the collapsible content with a themed content block set to 'a'.</p>

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

The line that specified the 2 themes is

<div data-role=’collapsible’ data-theme=’b’ data-content-theme=’a’>

Series Navigation<< jQuery Mobile: Basic Collapsible Header
jQuery Mobile: Collapsible Expanded >>