.click(): jquery .click() mausenin sol tuşunu kontrol etmemize yarayan bir fonksiyondur. .click() mausenin sol tuşuna basıldığında aktif olur.Örneğin butona tıkladığınız anda .clik aktif olur.
örnek click:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="js/jquery-1.10.2.min.js"> </script>
<script type="text/javascript">
$(document).ready(function(){
$("#hazir").click(function () {
alert('butona tikladiginizin farkindamisiniz...');
});
});
</script>
<title>click ödevim</title>
</head>
<body>
<input id="hazir" type="button" value="hazir" />
</body>
</html>
.hover():jquery .hover metodu nesnelerin üzerine gelindiğinde yeni durum belirlemeye yarar.
örnek hover:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="js/jquery-1.10.2.min.js"> </script>
<script type="text/javascript">
$(document).ready(function(){
$(".kutu1").hover(function () {
$(".kutu2").show(); },
function(){$(".kutu2").hide()}
);
});
</script>
<style >
.kutu1 { width:150px; height:50px; background:#066; color:#FFF;}
.kutu2 { width:150px; height:50px; margin-top:10px; background:#000;color:#FFF;}
</style>
<title>hover ödevim</title>
</head>
<body>
<div class="kutu1">buranin üzerine gelince</div>
<div class="kutu2">burasi gösterildi</div>
</body>
</html>
Araştırmamı yapıp örneklerimi tamaladım....
Hiç yorum yok:
Yorum Gönder