<?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="html-wide" table-class="display nowrap" order="3" framework="bootstrap">

<css lib="datatables responsive"/>
<js lib="jquery bootstrap datatables responsive">
<![CDATA[

$(document).ready(function() {
	$('#example').DataTable( {
		responsive: {
			details: {
				display: $.fn.dataTable.Responsive.display.modal( {
					header: function ( row ) {
						var data = row.data();
						return 'Details for '+data[0]+' '+data[1];
					}
				} ),
				renderer: $.fn.dataTable.Responsive.renderer.tableAll( {
					tableClass: 'table'
				} )
			}
		}
	} );
} );

]]>
</js>

<title lib="Responsive">Bootstrap modal</title>

<info><![CDATA[

This example shows the `r-init responsive.details.display` option being used with the `modal` option, which, when used with the Bootstrap integration for Responsive, will use Bootstrap's native modal display.

The built-in `modal` display option should be executed as a function with optional parameters passed in to control the behaviour of the modal display. In the case of Bootstrap it has only a `header` option which is a function that should return the title for the modal. If you do not wish to display a title, simply don't use this option.

Additionally, the `r-init responsive.details.renderer` option is used here to display the full data for the row, rather than just the hidden columns (which is the default behaviour) as this looks a bit better in a modal!

]]></info>

</dt-example>

