Can someone tell me what I am doing wrong here:
function onAjaxDone(data) {
var topicID;
$('#TopicID')
.html(data);
topicID = store.getItem('TopicID');
if (topicID) {
$("#TopicID")
.val(topicID);
$('option[value="88"]', this).remove();
$('option[value="99"]', this).remove();
}
}
I get an error saying “failed strict” and pointing to the lines with “this”. What I want to do is to remove the option lines with a value of 88 and 99 for the select element with id of TopicID. Am I coding this wrong? This was an example given to me but I am not sure why the “this” is there on those two lines.
This should do it: