Hey my website
www.m.keybench.com
is using jQuery mobile and having some serious problems! sometimes my script fires and other times it doesn't.. someone please help?
Hey my website
www.m.keybench.com
is using jQuery mobile and having some serious problems! sometimes my script fires and other times it doesn't.. someone please help?
"my script" ?
I looked at your other question yesterday, went to your site, after a menu click the header would indeed stop scrolling. There's a ton of scripts on there from all sorts of frameworks, themes and Google. Which one is not working? Or which one is supposed to do whatever it is that gets broken?
jQuery Mobile requires jQuery, so that's not it
thank you,
What i seem to believe is the problem is the version of jquery in conjuction with jquerymobile.
i'm using a lot of "normal," jquery but when i use the panels from jquery mobile my "normal," jquery stops working..
I've tried using .noConflict and no luck. I've tried placing jquery before jquery mobile, putting all the scripts in the footer.. I just can't seem to figure it out!
I love the fly out panels and i want to use it but everytime that i get the panels working flawlessly my jquery is buggy vice versa..
I checked again, in the console there are a couple of errors and the links aren't working like yesterday. Are you sure you need to relinquish the $
? jQuery and jQuery mobile should not have an issue with eachother using $
. Other libraries might, but jQuery is pretty common these days.
The fact that you did relinquish the $
might even be why other libraries (that require jQuery) stopped working.
One of the errors in the console is that jQuery is not defined in:
http://www.m.keybench.com/wp-content/themes/keybenchmobile/js/scripts.js?ver=1.0.0
which seems a custom script.
And neither is it on line 27:
jQuery(document).ready(function($) {
If you use the above you would need $.noConflict();
above it, according to the API guide. You don't have that until line 211.
do you think that i should be using $ rather than jQuery?
Also It wasn't working before, i just deleted all the other scripts i could find.
I would yes, if you click a link in the menu the console will show:
TypeError: $ is not a function
$( "#mypanel" ).trigger( "updatelayout" );
So you have parts relying on the $
. Was the problem before only with the non-fixed header? That seems like a less worse situation, and if the rest of the jQuery dependant parts kept running at that time it could just be a problem unrelated to jQuery/jQuery Mobile.
That's almost what i was thinking. I might take this local and strip one by one everything out. until i figure out what it is.
i just updated
TypeError: $ is not a function
$( "#mypanel" ).trigger( "updatelayout" );
to be
jQuery( "#mypanel" ).trigger( "updatelayout" );
still getting the same error. Do you think it could be the way i have my jQuery layed out? as in the jQuery events/actions im doing?
I'm still getting the three typerrors on the homepage, but clicking a link works and the header then stops resizing. If I however go to that page directly, the header does resize so it's not something on that page specifically.
How do you fetch a new page exactly? Through Ajax it seems to me. It could be that you are retrieving the entire new page, but then not binding the resize listener again to the new header perhaps.
okay, you kinda lost me.
I just used the built in navigation to HTML5 blank and inserted within the div data-type=panel just before the end of the </header>
I actually ended up taking out the JQM and just kept the jQuery in..
Although i started a new project with JQM and jQuery and got it to work flawlessly! I think it was me not paying proper attention to the docs.
i needed to specify that the page was using JQM with a div like so
<div data-role="page">
<div data-role="panel" id="mypanel">
<!-- panel content goes here -->
</div><!-- /panel -->
just thought i would clarify if anyone has this problem
It looks good without it as well, scaling ok here. What was the feature you wanted to use jQuery mobile for, the sliding divs?
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.