0

I'm trying to use jQuery's fadeIn and fadeOut method. This is what I have so far:

var fadeMainGrid = function() { 
$("#picturesGrid").fadeIn();
};

This is how I added jQuery to my HTML file:

<body dir="rtl">

  <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>


...
...

</body>

but still, when I try to run fadeMainGrid function, I get this error:

Uncaught TypeError: $(...).fadeIn is not a function

Can't understand what this is happening, I never wrote JS nor used jQuery till this project. Searching the web yield nothing, as everything gave me the same error. What's wrong here?

1 Answer 1

2

It looks like you're loading the slim bundle, which according to the downloads page:

...excludes the ajax and effects modules.

fadeIn and fadeOut would fall into that category. You may need to replace your jQuery bundle with one containing more capabilities.

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

1 Comment

Thanks, I didn't see that as I was getting jQuery through the Bootstrap website.

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.