Viewing content on a mobile device and using the scrolltop

I am working on a website that needs to be mobile-friendly. With the release of iOS 7, I wanted to achieve a depth and blurry effect. I used an iframe with a CSS3 filter applied to it and made it scroll along with the page using jQuery. Everything looks good on a computer, but when testing on a mobile device (iPhone iOS 6 with Safari), I noticed that the iframe only scrolls after I finish scrolling. Is there a way to make it move while I'm scrolling, not just after?

Here is the code snippet I am currently using:

$(function () {
    $(window).scroll(function (e) {
        var t = $(window).scrollTop();
        $('#blur').contents().find('body').scrollTop(t);
    });
});

For reference, here is an example: http://jsfiddle.net/X5ZbH/.

Thank you.

Answer №1

It's interesting to note that not all mobile handheld devices fully support the position:fixed property. There are some devices where this functionality is only partially supported. The position seems to reset when a complete scroll is made, leading to it following the flow of the page mid-scroll. It's definitely a bug that exists in phones and tablets for now.

I'm glad to see that Android handles this well though!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Automate Your iOS Development Workflow with Github Actions for Building, Testing, and Deploying

Currently, I am in the process of creating a straightforward workflow using GitHub Actions. The idea is that when I push a commit to the master branch, the code will be built on the macOS-latest environment and tested on OS 12.4, iPhone 11 Pro Max. Unfortu ...

Determine whether the color is a string ('white' === color? // true, 'bright white gold' === color? // false)

I am facing an issue with multiple color strings retrieved from the database. Each color string needs to be converted to lowercase and then passed as inline styles: const colorPickerItem = color => ( <View style={{backgroundColor: color.toLowerC ...

Struggling with calling rerenderEvents in FullCalendar using JQuery after a successful AJAX request

I seem to be encountering an issue where the calendar does not update after a POST request. Everything works smoothly until that point: $('#calendar').fullCalendar({ ... select: function (startDate, endDate) { $.ajax({ ...

Tips on accessing a MySQL database with Python using peewee and mysqldb

I am in the process of developing an iOS client for App.net and I am working on setting up a push notification server. Currently, my app has the capability to add a user's App.net account id (a string of numbers) and an APNS device token to a MySQL da ...

How can I incorporate my styles into a separate css file for use in a React project?

Although it may seem simple, I am interested in incorporating SCSS into my React application for styling purposes. I understand that React will interpret all of my styles and render them in separate <style> tags within the <head> section. I hav ...

The child element with a minimum height of 300 pixels is failing to inherit the height of its parent

Here is the HTML code for a div block I am working with: <div className={'row ge-container'}> <div className={'a-span3 ge-container-navigation'}> hello </div> <div className={'a-span9 ge-containe ...

Endless reloading of URL with jQuery

I am attempting to send parameters such as page and date_filter to the controller. However, I am facing an issue where creating and loading a new URL with the newly added parameter using JQuery results in the page continuously reloading. Below is my HTML ...

Rotate the image as you hover your cursor over it

I am trying to implement a script where the image is rotated when the user hovers over it. Unfortunately, the hovering effect is not functioning as expected. $("#alcazar-image").rotate({ bind: { mouseover : function() { $(this).rotate({anima ...

Unable to find the specified element within the dropdown menu

Trying to figure out how to distinguish my xpath from the following: <td onclick="hrefClick(this,4,0);" onmouseout="menuLevel2MouseOut(this);" onmouseover="menuLevel2MouseOver(this);" style="padding-left:30px; padding-top:10px; padding-b ...

Proceed to the section with modal

My goal is to create a modal with 4 sections, each loading its content dynamically using the .load() function to the container on the right side. The challenge I'm facing is that I have a footer menu that triggers the modal to open, and I need it to ...

Create a page turning effect in React that simulates scrolling a certain amount at a time

Is there a way to disable default scrolling and have the page automatically scroll to the next item? For example, if I have element2 below element1, how can I set it up so that when I scroll down once, the page scrolls directly to the position of element2 ...

Experiencing difficulties with a cross-domain jQuery/AJAX service request

After extensively researching various threads both on this platform and elsewhere, I have been trying to successfully execute a cross-domain AJAX call. The scenario involves a Restful WCF service that simply returns a boolean value. The service is configur ...

Having difficulty accessing the value of a table td element in HTML using a jQuery selector

When creating a table, I utilize ng-repeat to generate table rows. Whenever the dropdown changes, a function is triggered which applies certain conditions. Based on these conditions, an object is added to an array that is bound to a scope variable. Here i ...

How to retrieve only the last value from a JSON object using jQuery's .html

I'm having an issue with jQuery("#someID").html. It seems to only display the last name from the JSON data. Here is the javascript code: <div class="row" id="fetchmember"> <script type="text/javascript"> jQuery('#group').cha ...

The Boostrap background is failing to display as expected in CSS, and the `position: fixed` property is

I am struggling to add an extra class within the div class= "container-fluid" in order to set a background with a fixed position, but it doesn't seem to work. The only way I can add a background-image is directly in the HTML. Why is that? Another is ...

My form submission is getting messed up by VueJS, causing it to delete all of the data

It seems that VueJS is causing issues with my form submission process, as it is removing the post data from the Ajax serialize() function. I suspect it could be due to the combination of using Ajax and Jquery, but I'm unsure how to resolve this issue ...

Creating a dynamic table using JQuery to display data from a JSON object with a flexible number of fields

Dear all, I must apologize for any messy coding errors as this is my first attempt at something like this and I am learning on the go. I am currently working on using JQuery's $.each() method to iterate through a JSON object retrieved via an Ajax cal ...

HTML Plant with background removed

I have been attempting to create a tree structure similar to the image provided. However, I am encountering difficulty in getting the background stripes to align properly for a specific row. When resizing the browser window, the stripes do not remain fixed ...

Dynamic placement of divs when new content is added to the page

Before we begin, I'll provide you with the complete HTML code of my webpage: <div align="center"> <img src="http://questers.x10.bz/Header.png" style="position: absolute; margin-left: -440px; box-shadow: 0px 3px 12px 2px #000;" class="rotate" ...

Use CSS properties to isolate and extract the logo from the Sprite image

If we have a sprite image, like the StackOverflow sprite, and CSS properties like: background-position: 0px 0px; width: 250px; height: 61px; We can use the Chunky PNG library to crop out a specific part of the sprite. However, some websites use negative ...