Comment
Comment by zin win maw on November 5, 2009 at 3:34pm
Comment by Ei Maung on June 11, 2009 at 10:04am I'm afraid we'd lost control over our own codes.
$(document).ready(function(){
$("#mydiv").html("Hello, World!");
});
//ready method make sure the DOM tree is ready. more handy then onLoad()
$(document).ready(function(){
document.getElementById("mydiv").innerHTML = "Hello, World!";
});
Comment by TWN on June 10, 2009 at 10:55pm
Comment by Ei Maung on June 10, 2009 at 4:30pm //select with id
$("#elem").click(function(){
$("this").addClass("check");
});
//select with class
$(".elem").click(function(){
$("this").addClass("check");
});
//select div inside element
$("#elem div").click(function(){
$("this").addClass("check");
});
//select last p
$("p:last-child").click(function(){
$("this").addClass("check");
});
//bind click event to all link
$("a").each(function(){
$(this).click(function(){
//do something
});
});
//select all html elements with the way you can imagine
© 2013 Created by Ko Chit.

You need to be a member of MyanmarITPro - A Social Network for Myanmar IT Professionals to add comments!
Join MyanmarITPro - A Social Network for Myanmar IT Professionals