1
0
mirror of synced 2024-11-30 00:26:03 +03:00
select2/test-619.html

29 lines
667 B
HTML
Raw Normal View History

<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>