I have this JQuery Code how can i make it to work when form load, currently it only work on radio button click

I have this radio button 

```
 <div class="m-b">
   <label class="form-check-inline p-l-md m-l-0 m-r-md">
     @Html.RadioButtonFor(model => model.RangeType, "true", new { @name = "projectrange" })
  <div class="check-icon-radio"><i></i></div>Range
    </label>
    <label class="form-check-inline p-l-md m-l-0 m-r-md">
       @Html.RadioButtonFor(model => model.RangeType, "false", new { @name = "projectrange" })
    <div class="check-icon-radio"><i></i></div>Single Code
      </label>
   </div>

```

I tried this jquery but i doesnt get the radio button value when page load it works great when radio click, How can i make it to get the value of `model => model.RangeType,` and show/hide the `div`

```
  $(window).load(function () {
        $("input[name$='RangeType']").click(function () {
            if ($(this).is(':checked') && $(this).attr("value") == "true") {
                $('#singleCode').hide();
                $('#projectRange').show();
            }
            if ($(this).is(':checked') && $(this).attr("value") == "false") {
                $('#projectRange').hide();
                $('#singleCode').show();
            }
        });
    });

```