Problem Statement:Create a web page with a paragraph, which has a link at the end. If you click on the link, it slowly fades into(about 1.5 sec a #FF0000 (red)block over the text and with a #FFFF00 (yellow)text on the top.
My written HTML code is below:
<!DOCTYPE html>
<html>
<head>
<title>jquery</title>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script>
$(document).ready(function(){
$("[href]").click(function(){
$("p").hide();
$("#div1").fadeIn("slow","swing");
$("#div1").fadeIn(15000,"swing");
$("div").text("WELCOME GUYS!")
});
});
</script>
<style>
p{
width: 400px;
height: 90px;
}
div{
width: 550px;
height: 65px;
text-align: center;
font-size: 36px;
color: #FFFF00;
}
#div1{
width:400px;height:90px;display:none;background-color:#FF0000
}
</style>
</head>
<body>
<p>
Machine learning is a type of artificial intelligence (AI) that provides
computers with the ability to learn without being explicitly programmed.
<a href="#">click!</a> </p>
<div id="div1"></div>
</body>
</html>
My error which i have to rectify:- Should have got an 'p' component false What should i try now??