Why isn't this.value or $(this).val() responding in JavaScript / jQuery?
<p>I have the following <code>function</code>, which successfully increases the <code>value</code> of <code>input type="text"</code></p>

<pre><code>function deleteLine(arrayNumber) {
    $("#line" + arrayNumber + "_quantity").val(parseInt($("#line" + arrayNumber + "_quantity").val()) + 1);
}
</code></pre>

<p>I'm just wondering why these don't work instead, for a neater code:</p>

<pre><code>$("#line" + arrayNumber + "_quantity").val(this + 1);
$("#line" + arrayNumber + "_quantity").val(this.value + 1);
$("#line" + arrayNumber + "_quantity").val($(this).val() + 1);
</code></pre>
