<-- KIRTISHIL PATIL-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JQuery Basic</title>
<link rel="stylesheet" href="style.css">
<script src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous"></script>
</head>
<body>
<h1>JQuery Basic</h1>
<h3>Kirtishil Patil</h3>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Architecto, modi sed, enim temporibus nisi ducimus alias, exercitationem provident ipsum sit esse voluptates! Asperiores, repudiandae. Maxime sit laborum et inventore fugiat!</p>
<button id="but3">fadeOut</button>
<button id="but4">fadeIn</button>
<div class="imgs">
<img src="./2.jpg" alt="error">
</div>
<button id="but1">addClass</button>
<br>
<input type="text" id="name" value="" size="10">
<button id="but2">Submit</button>
<br>
<button id="slide">Slide</button>
<div id="one" style="background-color: red; width: 50px; height: 50px;">
</div>
<br>
<script>
/*
datepicker()
draggable()
droppable()
*/
$("img").attr("border","5px solid black")
$(document).ready(function(){
$("#but2").click(function(){
alert("Name: "+ $("#name").val());
})
$("#but1").click(function(){
$("img").addClass("styleClass");
})
$("img").click(function(){
$(this).hide();
})
$("input").on("keypress", function(){
$("p").hide();
})
$("#but3").click(function(){
$("img").fadeOut("slow");
})
$("#but4").click(function(){
$("img").fadeIn("fast");
})
$("#slide").on("click", function(){
$("#one").slideUp("slow");
})
$("#slide").on("click", function(){
$("#one").slideDown("fast");
})
})
</script>
<style>
.styleClass{
border: 5px solid red;
}
</style>
</body>
No comments:
Post a Comment