• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 590
  • Last Modified:

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!
0
bbdesign
Asked:
bbdesign
  • 8
  • 5
  • 3
1 Solution
 
Michel PlungjanIT ExpertCommented:
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>
0
 
bbdesignAuthor Commented:
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?
0
 
Michel PlungjanIT ExpertCommented:
It's in the source
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
bbdesignAuthor Commented:
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.
0
 
Michel PlungjanIT ExpertCommented:
What is the script that handles the about and contact?

Also main.js is empty

Also modernizr is before jquery is that correct?
0
 
bbdesignAuthor Commented:
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.
0
 
Michel PlungjanIT ExpertCommented:
Can you look on the server - the template or about html?
0
 
bbdesignAuthor Commented:
I don't even know what I'm supposed to be looking for?
0
 
Michel PlungjanIT ExpertCommented:
Sorry, then I'm also done.
0
 
Ray PaseurCommented:
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.
0
 
bbdesignAuthor Commented:
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.
0
 
Ray PaseurCommented:
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.
0
 
bbdesignAuthor Commented:
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.
0
 
Ray PaseurCommented:
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.
0
 
bbdesignAuthor Commented:
This problem is not widely documented, but I found this today:

https://github.com/jquery/jquery-mobile/issues/4887

I pulled back to jQuery 1.7.2 (instead of 1.8.0 which is current), and the problem is solved. Appears to be a bug in how jQuery and jQuery Mobile interoperate.

Thank you all for looking. I never would have found this by going through the Javascript myself.
0
 
bbdesignAuthor Commented:
Found the problem elsewhere, documented by another user.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 8
  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now