blob: 567d929f072b6e2a618882a0d8e55cbf354ff8a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
( function ( $, window ) {
$( document ).ready( function () {
$( "#MBTaddItemTest" ).click( function () {
$( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "add", "additem" );
});
$( "#MBTremoveItemTest" ).click( function () {
$( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "remove", 0 );
});
$( "#MBTinputTextTest" ).click( function () {
$( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "inputText", "Hello~~~" );
});
$( "#MBTgetInputTextTest" ).click( function () {
var input = $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "inputText" );
window.alert( "input String : " + input );
});
$( "#MBTremoveAllItemTest" ).click( function () {
$( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "remove" );
});
$( "#MBTgetSelectedItemTest" ).click( function () {
var content = $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "select" );
window.alert( "Select content : " + content );
});
$( "#MBTselectItemTest" ).click( function () {
$( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "select", 0 );
});
$( "#MBTlengthTest" ).click( function () {
var length = $( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "length" );
window.alert( "length : " + length );
});
$( "#MBTfocusInTest" ).click( function () {
$( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "focusIn", 0 );
});
$( "#MBTfocusOutTest" ).click( function () {
$( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "focusOut", 0 );
});
$( "#MBTdestoryTest" ).click( function () {
$( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "destory" );
});
$( "#contentList a" ).click( function () {
var arg = $( this ).text();
$( ":jqmData(role='multibuttonentry')" ).multibuttonentry( "add", arg );
});
$( "#cancelBtn" ).click( function () {
$.mobile.changePage( "#multibuttonentry", {
transition: "reverse slide",
reverse: false,
changeHash: false
} );
});
});
} ( jQuery, window ) );
|