$(#email).attr('value')
should give the original default value of an input, but with jQuery 1.8.1, gives the current value. Why is this? When was this change made? What steps should I take so I can be aware of these changes and not stumble upon them after finding things don't work as expected. Thank you
http://jsfiddle.net/ufrHD/2/ using jQuery 1.8.1
http://jsfiddle.net/ufrHD/3/ using jQuery 1.9.1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<title>Input</title>
<script src="http://code.jquery.com/jquery-1.8.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$("#click").click(function() {alert("$('#email').val()="+$('#email').val()+"\n$('#email').attr('value')="+$('#email').attr('value'));});
});
</script>
</head>
<body>
<button id="click">Click</button>
<input type="email" name="name" id="email" value="email@example.com" />
</body>
</html>