- 1
Why do my JavaScript codes fail to run
i tried an external and internal javascript codes but no.matter what it doesnt work ..why that
16 Respuestas
+ 1
can it be that you use both inline and external scripts?
+ 1
<script src="https://code.jquery.com/jquery-3.1.1.js"></script>
this one?
0
Please insert your code. And what do you mean by "internal" and "external"? In and out of sololearn or?
0
well on my computer
i inserted all my codes in just one page...my friend asked to to try put his codes...i cant seem to figure out why it doesnt work...give me 2mins and i will send you all the codes
0
<!-- Created by Andrew G-->
<!DOCTYPE html>
<html>
<head>
<style>
/* Created by Andrew G */
body {
background-color: #555;
font-family: 'Poiret One', cursive;
color: #FFF;
text-align: center;
transition: all 2.5s ease-out;
overflow: hidden;
}
p {
font-family: 'Poiret One', cursive;
}
.split{
width: 90vw;
height: 1px;
background-color: rgba(0, 0, 0, 0);
border: none;
position: absolute;
top: 25%;
left: 5%;
right:;
bottom:;
transition: all 2.5s ease-out;
transition-delay: 2.5s;
}
#desc{
width: 95vw;
text-align: center;
font-size: 5vw;
color: #000;
transition: all 5s ease-out;
position: absolute;
left:;
top:;
right:;
bottom:;
}
#title{
font-size: 10vw;
position: absolute;
top: 33%;
left:;
right:;
bottom:;
z-index: 3;
color: #FFF;
transition: all 2.5s ease-out;
text-align: center;
overflow: hidden;
width: 95vw;
height: 10vw;
display: block;
0
display: block;
white-space: nowrap;
}
#left{
background-color: #000;
width: 50vw;
height: 100;
position: absolute;
left: 0;
top: 0%;
bottom: 0%;
right:;
z-index: 2;
transition: all 2s ease-out;
float: left;
}
#right{
background-color: #000;
width: 50vw;
height: 100;
position: absolute;
left:;
top: 0%;
bottom: 0%;
right: 0;
z-index: 2;
transition: all 2s ease-out;
float: right;
}
#descTwo{
width: 95vw;
overflow: hidden;
text-align: center;
font-size: 5vw;
color: rgba(0, 0, 0, 0);
transition: all 5s ease-out;
position: absolute;
left:;
top:;
right:;
bottom:;
}
#tap{
width: 150px;
height: 45px;
position: absolute;
left:;
top:;
right: 0px;
bottom: 10vh;
background-color: #333;
transition: all 1s ease-in-out;
white-space: nowrap;
overflow: hidden;
transition-delay: 5s;
}
</style>
<link href="https://fonts.googleapis.com/css?family=Poiret+One" rel="stylesheet">
0
<script src="https://code.jquery.com/jquery-3.1.1.js"></script>
<title>Page Title</title>
</head>
<body>
<div id="left"></div>
<p id="title">Continue</p>
<hr class="split">
<p id="desc">Welcome to my SoloLearn Account!<br>My name is Andrew and as of February, 2017, I am 16, soon to be 17. Please Like and follow, just seeing those upvotes makes me smile.</p>
<p id="descTwo">I love programming, HTML sparks my creative side, CSS helps me persue my minimalistic designs, and JavaScript fulfils my quote <i>'programmer'</i> side. Programming to me is like puzzle, Everything has to fit perfectly for you to get good result.</p>
<div id="right"></div>
<div id="tap">
<p>Tap to Read More..</p>
</div>
<script>
// Created by Andrew G
$(function(){
$("#title").click(function(){
$("#left").css("width", "0vw");
$("#right").css("width", "0vw");
$("#left").css("backgroundColor", "#333");
$("#right").css("backgroundCol
0
$("#left").css("backgroundColor", "#333");
$("#right").css("backgroundColor", "#333");
$("body").css("backgroundColor", "#000");
$("#title").html("Andrew");
$("#title").css("top", "5vh");
$("#title").css("color", "#AAA");
$("#desc").css("top", "35vh");
$("#desc").css("color", "#AAA");
$(".split").css("backgroundColor", "#555");
$("#descTwo").css("top", "0vh");
$("#descTwo").css("color", "transparent");
$("#tap").css("width", "0px");
});
$("#desc").click(function(){
$("#title").html("About Me");
$("#desc").css("color", "#111");
$("#desc").css("top", "0vh");
$("#descTwo").css("top", "35vh");
$("#descTwo").css("color", "#AAA");
});
});
</script>
</body>
</html>
0
nope
just internal
0
inline
0
Would actually be nice if you make a codeproject in sololearn and insert the code there. Then you post the link to the code here and we can run it :)
I am on my work now, will check on your code after work
0
i did post it
it runs on solo learn but not my device
am confused
0
yes thats the one
0
You forgot to add jQuery before your script.
0
how can i do thay
0
that