Jquery .load() makes the target blank


If you run into the problem where calling .load(url) on an element makes it turn blank, you very likely have an unexpected space (” “) in your url.

You should re-examine it, it may be a trailing or leading space, which will make it difficult to see with the naked eye. Try calling the javscript .trim() on the url string.

At the time of this writing, I was using version 1.10.2.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This site uses cookies, mainly to provide basic functionality and some analytics (so that I can see how busy the site is, and which pages are popular). By continuing to use this site, you have agreed to the use of cookies. You can close this window/tab if you do not wish to browse this site.