ورود

View Full Version : تغییر اندازه با /javascript/jquery



p30online
دوشنبه 18 آذر 1392, 00:58 صبح
دوستان با چه دستوری می توان ارتفاع یک دایو را در صورت کلیک عوض کرد؟؟

ravand
دوشنبه 18 آذر 1392, 08:49 صبح
روی دیو کلیک کنی عوض میشه:

<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.clik{
background-color:#088d8f;
width:50px;
height:50px;
}
</style>
<script type="text/javascript" src="jquery.js">
</script>
<script type="text/javascript">
$(document).ready(function () {
$(".clik").click(function () {
$(".clik").css({"height":"100px"});
});
});
</script>
</head>
<body>
<div class="clik"></div>
</body>
</html>