the contains function doesnt work for me please help!!!
so i been going at it for hours
can you tell me where im messing up, im starting to think that the way im doing it its not supported by jquery no more this tutorials are from a year ago
index.php
- <!doctype html>
<html lang="eng">
<head>
<meta charset="utf-8">
<title>wassup</title>
<link rel="stylesheet" type="text/css" href="cs/style.css">
</head>
<body>
<p><input id="searchme" type="text" /></p>
<ul id="caca">
<li>hey you</li>
<li>fyck no</li>
<li>poikl mn</li>
<li>heiisds sdfafd</li>
</ul>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/heynow.js"></script>
</body>
</html>
heynow.js
- $(document).ready(function() {
$('#searchme').keyup(function() {
searchme = $(this).val();
$('#caca li').removeClass('highlight');
if (jQuery.trim(searchme) != '') {
$("#caca li:contains('" + searchme + "')").addClass('highlight');
}
});
});