I have a mobile website using jQuery and it $(window).scroll evenet. This works perfectly in Chrome and Safari Mobile, but Android native browser is showing me the middle finger.
I have this simple code:
$(window).scroll(function() {
alert("Scrolled");
}
But this alert never appears. I've done alerts in other parts of code, so alert are enabled and I extensively use jQuery so it's also loaded.
I am not sure what's going on here, am I missing something or is this a bug?
It's a bug or limitation in the Android browser, the built-in browser in Android is a lightweight version browser, so some features are not compatible
Simply use:
$("html:not(:animated),body:not(:animated)").animate({ scrollTop: 0 }, 400);
this will scroll you page to the top.
you can set "scrollTop: " value to set it to any specific TOP position.
dont forget to vote up.
:)
thanks
Related
I design new website using Joomla but this time I see something strange!
On any android device (by default browser (chrome)), it will show white screen if I refresh any pages of website.
please note it will happen only at "page refresh" events. I mean when you directly open the site with using address-bar and if you open links inside the website, it will show the page correctly, but if you refresh current page (with using "refresh button") you will see a "white screen" without any content.
I am sure that content is loaded correctly, because if you change the rotation of your tablet (or mobile) or if you tap white page and try to scroll down, website will appear!
seems there is several type of report for this problem:
https://superuser.com/questions/440416/chrome-displays-a-page-for-split-second-then-it-goes-blank
but I could not solve the problem with those solutions.
do you know any way to solve this problem?
Thanks
I got it
in Joomla by default jQuery is loaded. in Joomla 3.6.2 (that I am using), it's loading jQuery v1.12.4 by default that is stored in this directory: /media/jui/js/jquery.min.js
I just try to replace it by latest version, it solve problem but it create another one! in the console log I got a message that I can't use jQuery V3 because of bootstrap. then I downgrade to jQuery v2.2.4 (the latest version before version 3) and Hoooraaaaaaaaa, it's working now without any problem.
hope it help someone else
thanks
I have a website that I've just created that has a jquery-ui slider bar link removed
The slider bar doesn't seems to work properly on my phone which is an android - it could affect other mobile browsers too.
Is there a way of fixing this?
Thanks
I've just had a look on my phone and it also doesn't work. However, I have noticed in the past that other JavaScript items (on other sites) also don't work, so I don't think it's a specific problem with your site.
In terms of a workaround, you could check the viewer's user agent and display a different selection method if they're on a phone.
I have a working app built in jQuery Mobile and Phonegap (using Eclipse on Mac OSX)
Everything is working OK, except when the Ajax loading message pops up, the animated gif does not animate, it simply stick on the first frame.
Viewing the app in a web browser (as it is basically a mobile site) the gif animates no problem.
I have read that showing animated gifs on Android is tricky without using the web browser. Is there a way to get it to work? Maybe replace it with something in CSS3?
Although the comments explain why it doesn't work, this might get you started on finding a workable replacement: https://stackoverflow.com/a/2767556/878602
I experimenting with WebView in Android and I can't figure out how to make it work like the native browser.
I have an example for this:
Go to deviantART.com in native browser. Press Menu button. At the bottom of the menu there will be a link to disable mobile view and it works as expected. This exact same thing doesn't work in WebView. It simply turns the menu off and that is all, mobil CSS still stays intact.
I need to make users disable deviantART's mobile CSS, so I need the WebView to work like this.
JavaScript and DOMStorage are enabled.
I need the proper code or an workaround, but after hours of searching I didn't find anything that connected to this problem.
Thank you in advance.
If all you want is to turn off the mobile view you can set the user-agent string on the WebView using setUserAgentString (String ua).
I am new to phonegap and jqTouch, I am using these for developing Android application.
The problem is, the touch event on textfields working fine on iPhone, but not working on Android, nothing happens when we tap on textfield.
Edit: I came to know that the problem is because the iScroll plugin is being used. When I remove this, the functionality works fine, but I need to use this in my application.
Can anyone tell me what is wrong with iScroll and Android textfields?
Thanks in Advance.
I know the sort of problem you are talking about. When iScroll is being used on a page, it disables the input, select functionality within a form.
It is a known issue and there seem to be a few work arounds out there. Apparently, this is supposed to fix the issue without disabling the iScroll functionality:
In the touchStart function make sure to add the following condition:
if (e.target.tagName != "SELECT")
{
e.preventDefault();
e.stopPropagation();
}