jssor slider having issue for safari browser - jssor

I have embed jssor slider to my webpage. It works fine in all browser but for safari it slows down while slide.
Slider is having page size. means width:100%; height:100%;
Problem is only for safari.

Related

Resolution of iPhone app created with PhoneGap

I have some problems when putting images in my iPhone app using PhoneGap.
According to this website the width of any iPhone screen is 320pts.
In my CSS I have the following code:
#someId {
position:absolute;
top:0px;
left:0;
max-width:640px;
max-height: auto;
}
And in my HTML file the following snippet:
<img src="image.png" id="someId" alt="">
However, if I leave it like this, the image will always be bigger than the actual screen. I'm using the iPhone 6.0 Simulator.
Changing the value of max-width to 320pt doesn't change anything.
Does anyone have experience with this?
Because so many websites are designed assuming a typical desktop-sized browser window, Mobile Safari renders pages at the default width of 980 pixels. To override this default so that it only renders websites at the width of the screen, use the following <meta> element:
<meta name="viewport" content="width=device-width">

Media Query Fail inside Facebook Iframe

I am looking to find out why my #media queries are triggering when they are not supposed to, inside a Facebook Canvas iFrame Application. On a 810px wide page tab, the following media query is getting triggered:
#media only screen and (max-width: 767px) {}
Can someone explain to me why this would be the case? html and body are showing 810px wide. It works properly when viewing the same page on its own in a browser, as the query triggers as soon as I scale the browser down to 767px...
FYI this is the iFrame code that Facebook is displaying on my page tab:
<iframe name="app_runner_fb_https4fe3673cce0ac5c25797649"
id="app_runner_fb_https4fe3673cce0ac5c25797649"
style="width: 810px; height: 941px;" frameborder="0"
src="https://s-static.ak.facebook.com/platform/page_proxy.php?v=5#app_runner_fb_https4fe3673cce0ac5c25797649">
</iframe>
ALSO: The queries work just fine on the full app page (http://apps.facebook.com/...), as I have canvas width set to "fluid". The page tab doesn't seem to use this setting and only has a narrow 520px or wide 810px option.
Thanks for the input!
I have solved the problem. It turned out it was the viewport zoom or scale that was causing the queries to trigger. I did not have the default zoom level set on my browsers, so while it appeared to be 810px wide, it was actually something like 729, due to the zoom. To ensure users have their viewport zoom set to default, use the meta tag:
<meta name="viewport" content="width=device-width, initial-scale=1.0">

iframe content is displaying outside the iframe on iOS

Here is a fiddle (jsfiddle.net/salman/RQBra/show/) that demonstrates the problem I am facing. The iframes appear as expected in all browsers (including Safari 5 for Windows). But when I viewed the page on two iOS devices (iPad and iPhone) the content of iframe overflowed and covered the entire area on the right hand side of the iframe. Here is a screenshot of a page that uses similar iframes:
How can I workaround this issue?
You can fix it in a div, but on the iPhone it won't be scrollable without some javascript. I've made a fiddle that shows how you can fix the size of the iframe.
http://jsfiddle.net/RQBra/29/
basically, you wrap your iframe in a wrapper and give it some css:
#wrapper {
position:relative;
z-index:1;
width:400px;
height:400px;
overflow:scroll;
}
​
A workaround for your specific case is to replace the <iframe> by an <embed> element.
<embed src="..." type="text/html" width="400" height="400"></embed>
It will have the desired effect on Safari Mobile and clip the content to the specified width and height dimensions instead of auto-sizing it. Hoewever, embed is not specifically designed for HTML content and unwanted effects may result when dealing with scrolling, contentWindow and different environments (it is not necessarily rendered natively), so test the case before using it in production.
W3C:
The element represents an integration point for an external
(typically non-HTML) application or interactive content.
Hmm, try to wrap the iframes in divs, but not constraining the iframe's width and height by themselves.
I am guessing inside Iframe there is an HTML file, so in HTML wrap the content in wrapper div
#wrapper {
position: relative;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
it's size will be relative to html body, than the viewportSizes may be as you wish
the second row is handling flickering on Iframe click, happens in ios'...

Iframe Content Not Rendering Under Scroll In iOs5 iPad/iPhone

I'm developing iPad html5 webpage that needs to display pages from other origins (different domains).
I'm loading those pages into iframe, and scrolling the iframe using the iOs5 new scrolling ability, as shown in the code below.
<div id="myDiv" style="height: 1185px; width: 100%; overflow:scroll; -webkit-overflow-scrolling: touch;">
<iframe id="myIframe" src="http://http://css-tricks.com/forums/discussion/11946/scrolling-iframe-on-ipad/p1"></iframe>
</div>
The problem is that the off-screen iframe content is not becoming visible when scrolling to it (the frame is blank).
How can I overcome this issue and provide scrollable iframe solution?
OK. found the solution.
apparently, the problem appear when the main document height is shorter than the iframe that is scrolled.
the parts of the iframe page, that exceed the document height, are not rendered.
So, under my needs, I could solve the problem by adding such a js (with jquery) code:
<script>
$(function() {
var iframe = $("#myIframe");
iframe.load(function() {
$("body").height(iframe.height());
});
});
</script>
If you have an access to iFrame body, apply some transform3d to its content to enable GPU rendering.
In my case adding -webkit-transform: translate3d(0, 0, 0); to main wrapping div did the job.

touchdevices (ipad, iphone) and CSS top layer with 100% width and height?

hey guys,
I have a div.mapFullscreenContainer
#mapFullscreenContainer {
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
}
This div is shown when I scroll to the bottom and click on a button. In normal browsers this works just fine. The overlay is 100% wide and 100% high and lies on top of the page.
However on touch devices there is the problem that the overlay is always out of the viewport. Imagine the button that makes the overlay visible is in the footer of a rather long webpage. The overlay is always at the very beginning of the page so it's not immediately visible to the user. The user has to scroll back to the top to see the overlay.
Any idea how I could fix that so it behaves like on a normal browser. bottom:0; instead of top:0 doesn't make a difference.
you can use JS to count and apply total height of your page to this div http://jsfiddle.net/seler/FjeyK/