$.ready() Demo
function sethelloworld()
{
  $("#helloworld").click(function(){alert("Hello world");});
}
function setfoobar(){
  $("#foobar").click(function(){alert("Foo bar");});
}

$(sethelloworld);	// ตัวย่อของ $.ready(sethelloworld);
$(setfoobar);	// ตัวย่อของ $.ready(setfoobar);
ปุ่ม 2 ป่มข้างล่างคลิกแล้วต้องแสดงข้อความตามข้อความบนหน้าปุ่ม

จะเห็นได้ว่า function ทั้ง 2 จะถูกนำไปเข้าคิวของการทำงาน และจะไม่มีการทับกัน