Hallo,
bin anfänger in jQuery. Möchte eine Progressbar machen, wenn width==300px hat soll es auf eine andere Seite laden.
Mein HTML Code:
Dort ist der jQuery Code auch drin.
CSS:
#ladebalken ist das was überprüft werden soll...
Irgendwas will nicht, ... ?!
Ich bekomm es einfach nicht hin mit dem vergleich in jQUery
bin anfänger in jQuery. Möchte eine Progressbar machen, wenn width==300px hat soll es auf eine andere Seite laden.
Mein HTML Code:
PHP Code:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
</head>
<body>
<div id="loaderbg">
<div id="balken">
<div id="ladebalken"></div>
<script language="javascript" type="text/javascript">
if($("#ladebalken").attr({"width":"100px"},2000)){
$(location).attr('href','home.html');
};
$(document).ready(function(){
$("#ladebalken").animate({
width:'300px'
},10000);
});
</script>
</div>
</div>
</body>
</html>
CSS:
PHP Code:
body {
background: url(img/background-intro.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
#loaderbg{
background-color: white;
height: 150px;
left: 50%;
margin: -75px auto 0 -200px;
opacity: 0.5;
position: absolute;
top: 50%;
width: 400px;
border-radius:15px;
box-shadow:2px 13px 3px black;
}
#balken{
height: 25px;
width: 300px;
background-color: white;
position: absolute;
margin-top: -12.5px;
top: 50%;
margin-left: -150px;
left:50%;
border-radius:10px;
border:1px solid black;
box-shadow:0 0 3px black;
}
#ladebalken{
background-image: url(img/ladebalken.jpg);
height:25px;
width: 0px;
position: absolute;
left:50%;
top:50%;
margin-left: -150px;
margin-top: -12.5px;
border-radius:10px;
}
Irgendwas will nicht, ... ?!
Ich bekomm es einfach nicht hin mit dem vergleich in jQUery