JSFiddle - React, Tailwind, and code Playground
by webvitaly
HTML
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<form class="well">
<p>
<input type="text" value="wally" />
</p>
<p>
<span class="btn btn-primary get">get attr prop val</span>
</p>
<p class="log">
log
</p>
</form>
JavaScript
$(function(){
$('.get').click(function() {
var input = $(this).closest('form').find('input');
var prop2 = input.prop('value');
var attr2 = input.attr('value');
var val2 = input.val();
$('.log').text('prop='+prop2+' attr='+attr2+' val='+val2);
$('.log').animate({ // hilite
backgroundColor: "#ffffaa"
}, 500 )
.animate({
backgroundColor: "#f5f5f5"
}, 500 );
});
});