如何显示/隐藏div Ajax Jquery?

我在这个问题上花了很多时间,我一直找不到.parent()、Next()、.Next()或.Next()。为此,我想在设置了.put-range滑块值后,在Ajax上成功显示出名为.SubQuestion的div。一切运行良好,但是在$(this).next(".SubQuestion").show();和$(this).next(".SubQuestion").hide();上却不起作用。

我找不到div类显示,CSS也不工作。

<div class="row">
    <div class="col-9 my-1 input-ranges" id="range">
        @{ var questionId = Model.QuestionAndAnswer[i].QuestionId;
            var AcceptableScore = Model.QuestionAndAnswer[i].QuestionAcceptableScore;
        }
        @Html.TextBoxFor(model => model.QuestionAndAnswer[i].Ans_Score, htmlAttributes: new { @id = questionId, @tag = AcceptableScore, @class = "input-range", @min = "1", @max = "10", @step = "1", @type = "range" })
        YourScore <span class="range-value">1</span>
    </div>

    <div class="col-3">
        <a data-toggle="collapse" href="#ScoreComment_@i" role="button" aria-expanded="false" aria-controls="collapseExample">
            <div class="fs-3x text-center text-info"><i class="la la-comment-o"></i></div>
        </a>
    </div>

    <div class="col-12 bg-info SubQuestion" style="display:none">
        <h1>Result</h1>
    </div>

    <div class="col-12">
        <div class="collapse my-1" id="ScoreComment_@i">
            @Html.TextAreaFor(model => model.QuestionAndAnswer[i].Ans_Score_Note, new { @class = "form-control p-1 w-100", @maxlength = "4000", @rows = "4", @placeholder = "توضیحات" })
        </div>
    </div>
</div>

<script>
      $(function ($) {
         console.log($.ajax);
         $('.input-range').on('change', function () {
             $(this).next('.range-value').html(this.value);

             var questionId = $(this).attr("id");
             var QAScore = $(this).attr("tag");
             var rangevalue = $(this).nextAll('.range-value').first().text();
             if (rangevalue < QAScore) {
                 $.ajax({
                     url: "/Question/GetSubQuestion",
                     type: "POST",
                     datatype: "json",
                     data: { QuestionId: questionId },
                     success: function (data) {
                         $(this).next(".SubQuestion").html(data);
                         $(this).next(".SubQuestion").show(); 
                     }
                 });
             }
             else {
                 $(this).parent().nextAll(".SubQuestion").hide();
             }
         });
     });

    </script>

Here was the solution Thanks to @AndrewLohr

$(function ($) {
    $('.input-range').on('change', function () {
        $(this).next('.range-value').html(this.value);
        let subQuestion = $(this).parent().nextAll(".SubQuestion").show();
        var questionId = $(this).attr("id");
        var QAScore = $(this).attr("tag");
        var rangevalue = $(this).nextAll('.range-value').first().text();
        if (rangevalue < QAScore && rangevalue!=10) {
            $.ajax({
                url: "/Question/GetSubQuestion",
                type: "POST",
                datatype: "json",
                data: { QuestionId: questionId },
                success: function (data) {
                    subQuestion.html(data);
                    subQuestion.show();
                }
            });
        }
        else {
            $(this).parent().nextAll(".SubQuestion").hide();
        }
    });
});