Append button to button panel on header
Description
The following code shows how to append button to button panel on header.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.9.1.js'></script>
<script type="text/javascript"
src="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.js"></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.3.0-beta.1/jquery.mobile-1.3.0-beta.1.css">
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){<!-- www .j a v a 2s. com-->
$('#addbuttons').append('<a href="#" data-role="button" data-inline="true" data-iconpos="notext" data-icon="gear" data-theme="b">Edit</a>');
$('#addbuttons').append('<a href="#newevent1" data-role="button" data-iconpos="notext" data-inline="true" data-icon="plus" data-theme="b" data-rel="dialog">New Event</a>');
$("[data-role=button]").button();
});//]]>
</script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1 class="ui-title" role="heading" id="hdr"></h1>
<div class="ui-btn-right" id="addbuttons" data-role="controlgroup"
data-type="horizontal"></div>
</div>
</body>
</html>