December 29, 2009 | In: jQuery

jQuery Start

จากที่อ่านดูรู้สึกว่า jQuery นอกจากจะต้อง include jquery.js แล้ว จะต้องเขียนคำสั่งต่าง ๆ
ภายใต้คำสั่ง $(document).ready ด้วยนะ ไม่งั้นคำสั่งของ jQuery จะไม่ทำงานจ้า

1
2
3
4
5
<script type="text/javascript">
$(document).ready(function() {
     // your code
});
</script>

หรือใช้รูปย่อ

1
2
3
4
5
<script type="text/javascript">
$(function() {
     // your code
});
</script>

Popularity: 27% [?]

Comment Form