this.prop is not a function?
<p>My jQuery code is:</p>

<pre><code>$('#edit').click(function(){
    var data = $("#list :input").serialize();
    $.post($("#list").attr('action'), data, function(json) 
    {
        currentRow = json.rowArr[0];
        $("#id").val(currentRow.id);
        $("#id_disp").val(currentRow.id);
        $("#shop").val(currentRow.shop);
        $("#category").val(currentRow.category);
        $("#item").val(currentRow.item);
        $("#qnty").val(currentRow.qnty);
        $("#unit").val(currentRow.unit);

        $.each($("#price_based_on").children('option'), function(index, val) {
            if(this.value.toUpperCase()==currentRow.price_based_on.toUpperCase())
            {
                console.log("Match");
                this.prop("selected", true);
            }
        });

        $("#mrp").val(currentRow.mrp);
        $("#sellers_price").val(currentRow.sellers_price);
        $("#last_updated_on").val(currentRow.last_updated_on);

    },"json");
});
</code></pre>

<p>Among this, the only thing of interest are the lines:</p>

<pre><code>$.each($("#price_based_on").children('option'), function(index, val) {
    if(this.value.toUpperCase()==currentRow.price_based_on.toUpperCase())
    {
        console.log("Match");
        this.prop("selected", true);
    }
});
</code></pre>

<p>On using the statement <code>this.prop("selected", true);</code> I get the error:</p>

<blockquote>
  <p>Uncaught TypeError: this.prop is not a function</p>
</blockquote>

<p>Why does this happen when .prop() is clearly a function that exists? How do I fix it?</p>