Last active
December 19, 2015 03:39
-
-
Save surrealdetective/5892068 to your computer and use it in GitHub Desktop.
First practice with Jquery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Table of Contents | |
1. ./public/js/app.js | |
2.index.html | |
*/ | |
//app.js | |
$(document).ready(function(){ | |
$('#submit_search').click(function(){ | |
var search_term = $('#find_student').val(); | |
$("li:contains('" + search_term + "')").css("color", "yellow"); | |
}); | |
}); | |
//index.html, at the bottom of code, above </body> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> | |
<script>window.jQuery || document.write('<script src="js/jquery-1.8.0.min.js"><\/script>')</script> | |
<script src="js/app.js"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment