0

In MVC I am getting following error :

jQuery.Deferred exception: $(...).parents(...).andSelf is not a function

I just Installed the latest version of jQuery via NUGET. I'm getting stuck because of the above mentioned error.

5
  • 2
    Seeing your code would help here. What object are you using in the jQuery selector? Commented Mar 29, 2017 at 11:20
  • 2
    Also andSelf() was deprecated in jQuery 1.8, removed in jQuery 3, and replaced by addBack(). Commented Mar 29, 2017 at 11:23
  • Version of jQuery is pertinent in this case! Commented Mar 29, 2017 at 11:29
  • @DavidThomas it should be at min file or other Commented Mar 29, 2017 at 11:31
  • Thanks @DavidThomas Commented Mar 29, 2017 at 12:16

2 Answers 2

2

Sir, the andSelf() is deprecated in version 1.8 and removed from 3.0. that's why the above error is occurred. Here is some description: https://api.jquery.com/andself/

Sign up to request clarification or add additional context in comments.

Comments

0

I just replaced andSelf() with addBack() in jQuery min file .

Now working perfectly .

1 Comment

Please do not add an answer. Instead update your question with a note or just accept the answer - in this case it was the comment of David that was answering

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.