JQuery - how it works
I found interesting article regarding JQuery.
i excerised following examples which i found in the article.
i explained in detail
in design page
anchor tag
image button
submit button
javascript code
$(document).ready(function()
{
// default message on load of page
alert('hi');
//Click event of anchor tag
$('a').click(function()
{
alert('Thanks for visiting-Surya');
})
//Special Effects
$("a").click(function(event){
event.preventDefault();
$(this).hide("slow");
});
//$("a").addClass("test");
$('#btntest').click(function(event){
event.preventDefault();
$(this).hide("slow");
$(this).show("fast");
})
$('#imgdiss').click(function(event){
event.preventDefault();
$(this).hide("fast");
$(this).show("slow");
alert('Dont hit me badly hee hee.......... ');
})
//$("a")
// .filter(".clickme")
// .click(function(){
// alert("You are now leaving the site.");
// })
// .end()
// .filter(".hideme")
// .click(function(){
// $(this).hide();
// return false;
// })
// .end();
})
i excerised following examples which i found in the article.
i explained in detail
in design page
anchor tag
image button
submit button
javascript code
$(document).ready(function()
{
// default message on load of page
alert('hi');
//Click event of anchor tag
$('a').click(function()
{
alert('Thanks for visiting-Surya');
})
//Special Effects
$("a").click(function(event){
event.preventDefault();
$(this).hide("slow");
});
//$("a").addClass("test");
$('#btntest').click(function(event){
event.preventDefault();
$(this).hide("slow");
$(this).show("fast");
})
$('#imgdiss').click(function(event){
event.preventDefault();
$(this).hide("fast");
$(this).show("slow");
alert('Dont hit me badly hee hee.......... ');
})
//$("a")
// .filter(".clickme")
// .click(function(){
// alert("You are now leaving the site.");
// })
// .end()
// .filter(".hideme")
// .click(function(){
// $(this).hide();
// return false;
// })
// .end();
})
Comments