Skip to content
Create a gist now

Instantly share code, notes, and snippets.

anonymous /gist:488611

<script src="jquery-1.4.2.min.js"></script>
$(document).ready(function() {
$('#inputId').bind('keyup', function() {
$('#divs div').hide();
var divName = this.value;
if(divName) {
$('#divs #' + divName).show();
<input type="text" id="inputId">
<div id="divs">
<div id="cool">Cool</div>
<div id="neat">Neat</div>
<div id="suck">Suck</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.