More Related Content
More from Atsushi Tadokoro
More from Atsushi Tadokoro (20)
jQuery入門 - 芸大 Webデザイン演習B
- 7. ‣
‣
var divs = document.getElementsByTagName("h1");
for(var i = 0; i < divs.length; i++) {
divs[i].style.color = "red";
}
‣
- 10. ‣
var divs = document.getElementsByTagName("h1");
for(var i = 0; i < divs.length; i++) {
divs[i].style.color = "red";
}
$("h1").css("color", "red");
‣
- 16. ‣
‣
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>jQuery </title>
</head>
<body>
<h1>jQuery </h1>
</body>
</html>
- 19. ‣
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>jQuery </title>
<script src="http://www.google.com/jsapi"></script>
<script>google.load("jquery", "1");</script>
</head>
<body>
<h1>jQuery </h1>
</body>
</html>
- 21. ‣
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>jQuery </title>
<script src="http://www.google.com/jsapi"></script>
<script>google.load("jquery", "1");</script>
<script>
$(function() {
$("h1").fadeOut(3000);
});
</script>
</head>
<body>
<h1>jQuery </h1>
</body>
</html>
- 23. ‣
<script>
$(function() {
$("h1").fadeOut(3000);
});
</script>
<script>
$(function() {
$("h1").fadeOut(3000).fadeIn(3000);
});
</script>
- 33. ‣
‣
$(function() {
//h1 CSS
$("h1").css({
backgroundColor:"#336699",
color:"white",
size:"40px",
padding:"20px"
})
});
- 34. ‣
‣
‣
// 500px → 500px
$("h1").animate({marginTop:"500px"}, 500);
// 500px 1000ms
$("h1").animate({marginTop:"500px"}, 500)
.delay(1000)
.animate({marginTop:"0px"}, 200);
- 35. ‣
‣
$(function() {
//
$("h1").animate({
fontSize:"150px",
opacity:0.2
}, 500)
.delay(1000)
.animate({
fontSize:"40px",
opacity:1.0
}, 500);
});
- 36. ‣
‣
$(function() {
// NG
$("h1").animate({
color:"white",
backgroundColor:"blue"
}, 500));
});
- 38. ‣
$(function() {
//h1 CSS
$("h1").css({
backgroundColor:"#6699cc",
color:"white",
size:"40px",
padding:"20px",
})
.animate({
paddingLeft:"640px",
}).delay(200)
.animate({
paddingLeft:"20px",
marginLeft:"640px"
}).delay(200)
.animate({
paddingTop:"60%"
}).delay(200)
.animate({
marginLeft:"0"
}).delay(200)
.animate({
paddingTop:"20px"
});
Editor's Notes
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n
- \n