Verstecke ein bestimmtes Div vor der Iframe-JQueryJquery

JQuery-Programmierung
Anonymous
 Verstecke ein bestimmtes Div vor der Iframe-JQuery

Post by Anonymous »

Ich erstelle eine Webview-Anwendung mit Phonegap

Ich verwende die IFrame-Methode, um meine Website in der Anwendung anzuzeigen

Ich muss eine Popup-Nachricht für Benutzer mobiler Browser anzeigen, um die Anwendung herunterzuladen

Also erstelle ich ein einfaches Div, das aufgrund seiner Größe nur auf dem mobilen Bildschirm angezeigt wird

Wie kann ich verhindern, dass dieses Div in meiner IFrame-Anwendung angezeigt wird?

Ich probiere viele Tutorials aus und fragt, funktioniert aber bei mir nicht

das ist meine Iframe-Seite

Code: Select all


http://www.medicamall.com


Dies ist der vollständige Code meines Projekts

Code: Select all

$(window).load(function() {
$(".loader").fadeOut("slow");
});
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
setTimeout(function () {
navigator.splashscreen.hide();
}, 50);
}

// offline event
function checkConnection() {
var networkState = navigator.network.connection.type;
var states = {};
states[Connection.UNKNOWN]  = 'Unknown connection';
states[Connection.ETHERNET] = 'Ethernet connection';
states[Connection.WIFI]     = 'WiFi connection';
states[Connection.CELL_2G]  = 'Cell 2G connection';
states[Connection.CELL_3G]  = 'Cell 3G connection';
states[Connection.CELL_4G]  = 'Cell 4G connection';
states[Connection.NONE]     = 'No network connection';

return networkState;

}
function onDeviceReady() {
var networkState = checkConnection();
/* load local files if there is not network connection */
if (networkState == Connection.NONE) {
$('.openapp').children('a').attr("href","offline.html");
}
}

Code: Select all

body {
-webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
-webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
-webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */
width:100%;
}
html {
height:100%;
overflow:hidden;
margin:0;
padding:0;
}
body {
margin:0;
padding:0;
height:100%;
}
#iframe {
border:none;
width:100%;
height:100%;
}
.loader {
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
background: url('../img/Preloader.gif') 50% 50% no-repeat rgb(255,255,255);
}

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post