JQuery with Some Days

Hello Readers

I am now ready to learn about JQuery. You know that, JQuery is a JavaScript library. Lets start to learn JQuery now. It is very easy to learn.

First you have to download the library of JQuery form the website of http://www.jquery.com. After going here, you have to download “jQuery” and save into your computer with any name as a java Scritpt file (.js) extension.

jquery website link

Now open your favorite compiler & Then save this file name jquery.js in a folder named day1. Create a html file and save this with the name of day1.html.The HTML code is like that-

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My First Day with jQuery</title>
<script type="text/javascript" src="../library/jquery.js"></script>


<style type="text/css">
    #box{
        width:300px;
        height:300px;
        background:red;
    }
</style>

<!-- Start JQuery -->

<script type="text/javascript">
    $(function(){
        $('a').click(function(){
            $('#box').fadeOut();
        });
    });


</script>

</head>

<body>
<div id="box">

</div>

<a href="/">Close this Box</a>
</body>
</html>



I just used here a jquery library and then write some code. out put of first word
When user "Close the Box" link, the box will be close.

This is very simple work. If you face any problem, Just write 
your comments or mail to me. 
Thanks to read this tutorial and wait for next tutorial.

Bye for today.
Advertisements

1 Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s