Create a gist now

Instantly share code, notes, and snippets.

anonymous /gist:488611
Created Jul 24, 2010

What would you like to do?
<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