bond1211,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
$(document).ready(function () {
$('.plus_minus_icon').on("click", function () {
var $sum = $('#product_buy_quantity'),
Value = $sum.val();
if ($(this).hasClass("plus")) {
Value = parseFloat(Value) + 5
} else {
if (Value > 1) {
Value = parseFloat(Value) - 5
}
}
$sum.val(Value);
$sum.change();
});
$('#product_buy_quantity').on("change input", function () {
var main_price = Number($('#formated_price').data('price'));
var input_quantity = Number($('#product_buy_quantity').val());
main_price *= input_quantity;
$('#formated_price').text(main_price) })
});
</script>
</head>
<body>
<div class="plus_minus_icon plus">↑</div>
<input type="text" class="num" name="quantity" id="product_buy_quantity" size="2" value="10" />
<div class="plus_minus_icon minus">↓</div>
<div id="formated_price" data-price="100">100</div>
</body>
</html>