jquery - Is there any way to call "benchmark" in the javascript code -
I am trying to understand the javascript code, which jquery expands I know that $ jquery call on jquery object
I want to clear the cache on a tablery object, something like
$ ("# myTable"). Tanner (); $ ("# Mytable") buildParserCache () .; // To get the cache cleared I get undefined $ ("# MyTable") is not a function. Tanner () BuildParserCache () // is also not necessarily a function Does anyone explain why this is not possible and how to clear the cache I know that I have some JS design patterns and I am against the rules of scope, and I want to understand them.
(function ($) {$ .extend ({tableorter: new function ()} Var parsers = [], widgets = []; this.defaults = {...}; / * Debugging utilities * / Function Benchmark (S, D) {Log (S + "," + (New Date). () - d.getTime ()) + "MS");} Create FunctionParcercache (Table, $ Headers) {if (table.config.debug) {var parsersDebug = "";}
< P> buildParserCache function is defined inside function () that starts on the fourth row of that snippet, so it only accesses outside the function yo It will be obvious if it comes out clearly - and it seems that it is not so, it is effectively a personal function. Methods / * Public methods * / appears to be grouped after the comment. this.construct = function function is forwarded by the following: $. Fn.extend ({tableorter: $ .tablesorter.construct}); There is a function that is terminated when called $ ("# myTable"). Corner () is called .
Comments
Post a Comment