Skip to content

Instantly share code, notes, and snippets.

@kblake
Created January 14, 2009 19:17
Show Gist options
  • Save kblake/47008 to your computer and use it in GitHub Desktop.
Save kblake/47008 to your computer and use it in GitHub Desktop.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="jquery-1.3.min.js" type="text/javascript"></script>
</head>
<body>
FireUnit Fun!
<input type="text" id="blah" name="blah" value="blah" /><br/>
<div id="some_div">some div</div>
</body>
</html>
<script>
$("#blah").focus(function(){
$(this).after("<p id='hello'>hello</p>");
});
$("#blah").blur(function(){
$("#hello").remove();
});
</script>
<script>
//TESTS!
fireunit.compare($("#blah").val(), "blah", "Compare form element - pass");
fireunit.compare($("#some_div").length > 0, true, "blah element exist");
fireunit.focus($("#blah"));
fireunit.compare($("#hello").length > 0, true, "hello element exist");
fireunit.testDone();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment