I have a patternlab implementation (edition-node-gulp). I'm trying to add selectize.js to it (https://github.com/selectize/selectize.js). When I add the indicated jquery function to the foot.mustache file, and check out the result, console indicates reference error: can't find variable $
(i.e. not recognizing jquery). When I add jquery.min.js to the head.mustache, above my selectize.js script tag, some of pattern lab's functionality stops working, some of it STARTS working, and I start getting different error messages (i.e. it now recognizes jquery). TypeError: $('#select-beast').selectize is not a function.
Here's head.mustache:
<!DOCTYPE html>
<html class="{{ htmlClass }}">
<head>
<title>{{ title }}</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="../../css/style.css?{{ cacheBuster }}" media="all" />
<link rel="stylesheet" href="../../css/pattern-scaffolding.css?{{ cacheBuster }}" media="all" />
<!-- Begin Pattern Lab (Required for Pattern Lab to run properly) -->
{{{ patternLabHead }}}
<!-- End Pattern Lab -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
<script src="../js/selectize.js"></script>
</head>
<body class="{{ bodyClass }} prg">
And here is foot.mustache:
<!--DO NOT REMOVE-->
{{{ patternLabFoot }}}
<!--selectize -->
<script type="text/javascript" src="selectize.js"></script>
<link rel="stylesheet" type="text/css" href="selectize.css" />
<script>
$(function() {
$('select').selectize(options);
});
</script>
<!-- end selectize -->
</body>
</html>