1
0
mirror of synced 2024-11-25 22:36:03 +03:00
select2/select2-3.3.0/test-619.html

29 lines
667 B
HTML
Raw Normal View History

2013-02-06 06:41:52 +04:00
<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>