Last active
December 14, 2015 06:09
-
-
Save wok/5040447 to your computer and use it in GitHub Desktop.
select2 - jQuery UI 1.10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script src="http://code.jquery.com/ui/1.10.1/jquery-ui.js"></script> | |
<script src="select2.js"></script> | |
<link rel="stylesheet" type="text/css" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery-ui.css"/> | |
<link rel="stylesheet" type="text/css" href="select2.css"/> | |
<style type="text/css"> | |
select { width: 300px; } | |
</style> | |
<script type="text/javascript"> | |
$(document).ready( function() { | |
$("#dialog").dialog({ | |
modal: true | |
}); | |
// does not work: | |
$("select").select2(); | |
// works: | |
//$("select").select2( { dropdownCssClass: 'ui-dialog' } ); | |
}); | |
</script> | |
</head> | |
<body> | |
<div id="dialog"> | |
<select> | |
<option value="one">One</option> | |
<option value="two">Two</option> | |
<option value="three">Three</option> | |
<option value="four">Four</option> | |
</select> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment