javascript - How to detect if Jquery syntax highlighting is applicable to a source file -


i'm implementing script detect if jquery being used within javascript source file (for sublime text plugin).

right (aside obvious javascript extension test) solution checks if of following substrings appears within file:

jquery_idioms = [     '$(function',     '$(document)',     '$(window)',     '$(this)'     '$.fn',     '$.ajax',     '$.noconflict',     'jquery.noconflict' ] 

i don't think 100% certanity achievable (because of similar libraries using replicating jquery's api, etc), i'm trying build list of substrings avoids false positives.

as not huge jquery expert, question is:

am missing used jquery idioms?

ps: (i don't think it's possible but) alternative non substring searching ideas?


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -