Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialraghuramkumar
322 Pointswhen to add dependencies (array('')) parameters while using enqueue scripts
unable to understand when to use array dependencies while using enqueue scripts. How to know if one javascript file is dependent
1 Answer
Stanley Thijssen
22,831 PointsThis is quite simple. Take jQuery depency for example.
When you are writing a script with jQuery, you need jQuery to load before the script you are writing.
So to make your script work you have to load jQuery before your own script. This means your script is dependent to jQuery.