I want Detect the largest number in inputs and done alert for it, How is it in following code by jQuery?
Example: http://jsfiddle.net/3cTqD/
<input type="text">
<input type="text">
<input type="text">
<input type="text">
<button>Click Me</button>
$('button').live('click', function(){
$('input').each(function(){
var val = $('this').val();
alert(val); // i want done alert largest number from input
})
})
1 Answer