has anybody used the toChecklist jquery plugin, i am trying to use it and followed the instructions, but nothing happen at all, here is my code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<script type="text/javascript" src="jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="jquery.toChecklist.min.js"></script>
<!-- Stylesheet -->
<link type="text/css" rel="stylesheet" media="screen" href="jquery.toChecklist.min.css" />
<!-- Code to run toChecklist -->
<script type="text/javascript">
$(function() {
$('mySelectBox').toChecklist();
});
</script>
</head>
<body>
<select id="mySelectBox" multiple="multiple">
<option>Value 1</option>
<option>Value 2</option>
<option>Value 3</option>
</select>
</body>
</html>
toChecklist plugin uses two old and obsolete ways to access innerHTML, for examples :
var labelText = $(this).attr('innerHTML');
checkboxValue = this.innerHTML;
which is not available in jquery 1.6+
So you have 2 choices to make it work for you.
Change those lines (and other lines like this) in toChecklist.js to something like these
var labelText = $(this).html();
checkboxValue = this.html();
Please see http://forum.jquery.com/topic/jquery-change-innerhtml for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With