Link to home
Start Free TrialLog in
Avatar of Brad Bansner
Brad Bansner

asked on

Strange "0" zero characters appears when linking jQuery Mobile navigation links

On this site, which is in production

http://arlingtoncemetery.us/mobi

Click the About Us link. A zero appears below the list of buttons. Depending on what you click, additional zeros appear. What is causing this? It happens in my browser and also iOS simulator.

Thank you!
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

its part of your data

after <div class="ui-footer ui-bar-a ui-footer-fixed slideup" data-id="nav" data-position="fixed" data-role="footer" role="contentinfo">...</div>
Avatar of Brad Bansner
Brad Bansner

ASKER

Where are you seeing that? My footer looks like this:

<div data-role="footer" data-position="fixed" data-id="nav">
	<div data-role="navbar">
		<ul>
			<li><a href="#search">Search</a></li>
			<li><a href="#contact">Contact Us</a></li>
			<li><a class="ui-btn-active ui-state-persist" href="#about">About Us</a></li>
		</ul>
	</div>
</div>

Open in new window


Where are the zeros coming from? Created by Javascript? Or you are seeing them in one of the files?
It's in the source
But can you point to where exactly? I am not seeing it. Something is adding those zeros dynamically, because more and more appear as you click the links. Somewhere in the Javascript? Thank you.
What is the script that handles the about and contact?

Also main.js is empty

Also modernizr is before jquery is that correct?
I am using jQuery Mobile, that is all the scripting that is in place. I have not added any scripts to main.js yet, but that shouldn't be a problem? Yes, Modernizr comes first, that is part of the HTML5 Boilerplate template:

http://html5boilerplate.com

Everything is out-of-the-box defaults, I haven't altered anything, so that is why I am surprised there is any problem.
Can you look on the server - the template or about html?
I don't even know what I'm supposed to be looking for?
Sorry, then I'm also done.
Using Firebug, it appears that something is injecting the zeros, one at a time on a newline, into the <body> element at the end.  It appears (but I could not verify) that the zeros get injected every time a link is clicked.  Don't know where to tell you to look, but something that is modifying the <body> is probably the culprit.
This would most certainly have to be coming from Javascript then, correct? Yes, it appears to be individually counting the number of times each of the main links is clicked.
Yes, it's coming from JS for sure.  It is not present in the "view source" output, so it is getting injected into the document by some action in response to a client input.
I tried disabling all of my Javascripts, one by one. It has to be jQuery Mobile's JS file. As I said, I am using it "out of the box"... I can't imagine that by default its supposed to add zeros to the bottom of your pages. I am using version 1.1.1 released in July. I don't know else to try, other than installing an older version of jQuery Mobile.
I think that's the first thing I'd try.  At least it would let you know for sure if it is jQuery Mobile, or the interaction of jQuery Mobile with the other JS components.
ASKER CERTIFIED SOLUTION
Avatar of Brad Bansner
Brad Bansner

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Found the problem elsewhere, documented by another user.