<link href="//cdn.bootcss.com/select2/3.5.4/select2.min.css" rel="stylesheet"/>
<script src="//cdn.bootcss.com/jquery/1.7.1/jquery.min.js"></script>
<script src="//cdn.bootcss.com/select2/3.5.4/select2.min.js"></script>
<style>
img {
width:100px;
height:100px;
}
</style>
<input type="hidden" class="bigdrop" id="e6" style="width:600px" value="" />
<script>
$("#e6").select2({
placeholder: "Search for a repository",
minimumInputLength: 1,
ajax: { // instead of writing the function to execute the request we use Select2's convenient helper
url: "https://api.github.com/search/repositories",
dataType: 'json',
quietMillis: 250,
data: function (term, page) {
return {
q: term, // search term
};