0

I'm working on a simple razor view with Rider IDE, so I create a simple function as:

@section Scripts {
         <script>
       function passwordToggle(button, input) {
         $(button).click(function() {
           if ($(input).attr('type') === "password") {
             $(input).attr('type', 'text');
           } else {
             $(input).attr('type', 'password');
           }
         })
       }

       passwordToggle('#toggleCurrentPassword', '#currentPassword');
       passwordToggle('#toggleNewPassword', '#newPassword');
       passwordToggle('#toggleConfirmPassword', '#confirmPassword');

        </script>
    }

The code is working but the IDE is detected problems on each use of symbol $

Unresolved function or method $()

And

Invalid number of arguments, expected 0

on .click function

How can I solve this? Regards

Demian
  • 65
  • 5
  • The docs for Rider appear to be relevant here: https://www.jetbrains.com/help/rider/Configuring_JavaScript_Libraries.html#ws_js_external_library_downloaded_from_CDN – freedomn-m Oct 24 '22 at 08:14

0 Answers0