One of our developers used jquery on a couple of pages and now we're not sure which pages those are.
Is there a way to test for dependencies? I.e., given a collection of pages, which need jquery?
Webmasters Stack Exchange is a question and answer site for webmasters. It only takes a minute to sign up.
Sign up to join this communityTo expand on Martijn's comment...
jquery code heavily uses a function name $
. jquery code is littered with experssions like $(this)
and $('#foo')
. If you search your files for $(
you will likely identify any that have jquery code embedded in them.
If he used some code based on JQuery, he was forced to implement JQuery into the head of these given pages, where JQuery based code worked. Non case-sensitive search in all files for jquery
should do the trick.
Beside of this, developer tools (chrome or ff) would rise an error alert, if any code misses its library. But so you should go page by page.
fgrep '$(' -R * | more