1
0
mirror of synced 2024-11-22 04:56:08 +03:00
select2/select2-3.3.0/test-619.html
2013-02-05 18:41:52 -08:00

29 lines
667 B
HTML
Executable File

<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<link href="select2.css" rel="stylesheet"/>
<script type="text/javascript" src="select2.js"></script>
</head>
<body>
<select id="s1">
<option value="A"></option>
<option value="B"></option>
</select>
<script type="text/javascript">
$(document).ready(function () {
$("#s1").select2({}).on("change", function () {
alert("Changed caused by val()");
}).select2("val", "A");
// This should not trigger a change
$("#s1").select2("val", "B", false);
});
</script>
</body>
</html>