You need to sign in or sign up before continuing.
Newer
Older
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Getting Started</title>
<!-- add one of the jQWidgets styles -->
<link rel="stylesheet"
href="jqwidgets/jqwidgets/styles/jqx.base.css" type="text/css" />
<link rel="stylesheet"
href="jqwidgets/jqwidgets/styles/jqx.darkblue.css" type="text/css" />
<!-- add the jQuery script -->
<script type="text/javascript" src="jqwidgets/scripts/jquery-1.11.1.min.js"></script>
<!-- add the jQWidgets framework -->
<script type="text/javascript" src="jqwidgets/jqwidgets/jqx-all.js"></script>
</head>
<body>
<script type="text/javascript">
$(document).ready(function () {
$("#myButton").jqxButton(
{ width: '120px', height: '35px', theme: 'darkblue' }
);
});
</script>
<input type="button" value="Click Me" id='myButton' />
<div id='content'>
<script type="text/javascript">
$(document).ready(function () {
var source = [
"Affogato",
"Americano",
"Bicerin",
"Breve",
"Café Bombón",
"Café au lait",
"Caffé Corretto",
"Café Crema",
"Caffé Latte",
"Caffé macchiato",
"Café mélange",
"Coffee milk",
"Cafe mocha",
"Cappuccino",
"Carajillo",
"Cortado",
"Cuban espresso",
"Espresso",
"Eiskaffee",
"The Flat White",
"Frappuccino",
"Galao",
"Greek frappé coffee",
"Iced Coffee",
"Indian filter coffee",
"Instant coffee",
"Irish coffee",
"Liqueur coffee"
];
// Create a jqxDropDownList
$("#jqxWidget").jqxDropDownList({ source: source, selectedIndex: 1});
$("input[name=fruit]").click(function(evt) {
var data = [
"Affogato",
"Americano",
"Bicerin",
"Affogato",
"Americano",
"Bicerin"
];
$("#jqxWidget").jqxDropDownList({source: data, selectedIndex: 3});
});
var data = [{ "empName": "test", "age": "67", "department": { "id": "1234", "name": "Sales" }, "author": "ravi"},
{"empName": "test2"}
];
// prepare the data
var source =
{
datatype: "json",
datafields: [
{ name: 'empName' }
],
localdata: data
};
var dataAdapter = new $.jqx.dataAdapter(source);
$("#inputAdapter").jqxDropDownList({source: dataAdapter, placeHolder: "Enter text here", displayMember: "empName"});
});
</script>
<div id='jqxWidget'>
</div>
<div id="inputAdapter">
</div>
<div>
<input type="radio" name="fruit" value="apple"> Apple
<br>
<input type="radio" name="fruit" value="prune"> Prune
</div>
</div>
</body>
</html>