I have a plugin that access the length
property on many elements. However, the javascript console points to line 12 of jquery.min.js.
How can I backtrace to find which line of my plugin has null variable attempting to access length
?
I have a plugin that access the length
property on many elements. However, the javascript console points to line 12 of jquery.min.js.
How can I backtrace to find which line of my plugin has null variable attempting to access length
?
How can I backtrace to find which line of my plugin has null variable attempting to access length?
firebug is great way to debug those errors.
Not the solution for this time, but do yourself a huge favor, don't develop plugins on minified jQuery. Also, you should always check if the element exists at all before checking the length.
If you use minified scripts any debugger (like totally the best firebug) will show you the same problematic line and this information is useless (minified scripts are hard to read and understand and they are written in 1 line).
Few ways to solve problems like this:
Hope some of this will help you out. Good luck.