Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 1st, 2012  |  syntax: None  |  size: 0.99 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. What could cause this randomly appearing error inside jQuery itself?
  2. this.element.find('.banner-btn')
  3.        
  4. Uncaught TypeError: Cannot call method 'apply' of undefined
  5. makeArrayjquery-1.7.2.js:4858
  6. Sizzlejquery-1.7.2.js:5110
  7. jQuery.fn.extend.findjquery-1.7.2.js:5432
  8.        
  9. // Take an array of elements and push it onto the stack
  10. // (returning the new matched element set)
  11. pushStack: function( elems, name, selector ) {
  12. if(window._debug_jQuery_pushStack) { debugger }
  13.     // Build a new jQuery matched element set
  14.     var ret = this.constructor();
  15.  
  16. // ---- the function continues, but this is enough for us ----
  17.        
  18. pushStack: function( elems, name, selector ) {
  19.     // Build a new jQuery matched element set
  20.     var ret = this.constructor();
  21.  
  22.     // temporary workaround for chrome issue #125148
  23.     // http://code.google.com/p/chromium/issues/detail?id=125148
  24.     if (!(ret instanceof jQuery.fn.init)) {
  25.         console.log("applying pushStack fix");
  26.         ret = new jQuery.fn.init();
  27.     }
  28.  
  29.     // ... snip ...