This is my sample code. The select function is not working. What I'm doing wrong here. Browser chrome, OS Windows 7.
<!DOCTYPE html>
<html>
<head>
<style>
p { color:blue; }
div { color:red; }
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<p>
Click and drag the mouse to select text in the inputs.
</p>
<div id="b">Some text in div element</div>
<div id="a"></div>
<script>
$(document).ready(function(){
$("#b").select( function () {
$("#a").text("Something was selected").show().fadeOut(1000);
});
});
</script>
</body>
</html>