1 ( function ( $, window ) {
\r
2 $( document ).ready( function () {
\r
3 $( "#MBTaddItemTest" ).click( function () {
\r
4 $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "add", "additem" );
\r
7 $( "#MBTremoveItemTest" ).click( function () {
\r
8 $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "remove", 0 );
\r
11 $( "#MBTinputTextTest" ).click( function () {
\r
12 $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "inputText", "Hello~~~" );
\r
15 $( "#MBTgetInputTextTest" ).click( function () {
\r
16 var input = $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "inputText" );
\r
17 window.alert( "input String : " + input );
\r
20 $( "#MBTremoveAllItemTest" ).click( function () {
\r
21 $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "remove" );
\r
24 $( "#MBTgetSelectedItemTest" ).click( function () {
\r
25 var content = $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "select" );
\r
26 window.alert( "Select content : " + content );
\r
29 $( "#MBTselectItemTest" ).click( function () {
\r
30 $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "select", 0 );
\r
33 $( "#MBTlengthTest" ).click( function () {
\r
34 var length = $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "length" );
\r
35 window.alert( "length : " + length );
\r
38 $( "#MBTfocusInTest" ).click( function () {
\r
39 $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "focusIn", 0 );
\r
42 $( "#MBTfocusOutTest" ).click( function () {
\r
43 $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "focusOut", 0 );
\r
46 $( "#MBTdestoryTest" ).click( function () {
\r
47 $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "destory" );
\r
50 $( "#contentList a" ).click( function () {
\r
51 var arg = $( this ).text();
\r
52 $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "add", arg );
\r
55 $( "#cancelBtn" ).click( function () {
\r
56 $.mobile.changePage( "#multibuttonentry", {
\r
57 transition: "reverse slide",
\r
63 } ( jQuery, window ) );