Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Uncaught TypeError - invalid input #146
I've tried various combinations (with/without jquery, ipv6, punycode; minified, only whitespace). Same error in Chrome and IE10, maybe this issue is related to SharePoint 2013 wrapping the script files? Including jQuery or other scripts in my SharePoint page does work fine.
I encountered this error myself today. It occurs when setting href/src using a String object rather than a string. I noticed it when setting an image src through jQuery using a String object which works fine when using jQuery but will fail when URI.js with jQuery plugin is loaded. Easy fix is wrapping the value with String(), thus converting it to a primitive string.
So why would you use String objects over primitives? Apparently jQuery calls .each() with
So it's easily possible to run into this problem without even knowing what you did wrong.
See this fiddle that produces the error: http://jsfiddle.net/n3y27v2f/