mercredi 3 juin 2020

Checkbox Dropdown not shown correctly

I created a dropdown list with checkboxes (or at least I tried to) with this guide: https://www.codexworld.com/multi-select-dropdown-list-with-checkbox-jquery/ However, the dropdown isn't displayed correctly and looks like shown in the picture. My html:

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js">$
<script src="multiselect/jquery.multiselect.js"></script>
<link rel="stylesheet" href="multiselect/jquery.multiselect.css">
<script src=""></script>
</head>
<body>
<select name="drug" multiple id="drug">
    
</select>
</body>

and my js:

$('select[multiple]').multiselect();
$('#drug').multiselect({
columns: 1,
placeholder: 'Select drugs'
});

I am not that proficient in front end development, so I am at a loss right now as to what might be going wrong. ...why?




Aucun commentaire:

Enregistrer un commentaire