Social Icons

Showing posts with label jQuery. Show all posts
Showing posts with label jQuery. Show all posts

Sunday, February 3, 2013

How can u work by class selector?


Now i will teach how can jquery work by class selector...

Syntax:

 $(". class name").hide()


Now just copy this code on notepad and see....

<!DOCTYPE html>
<html>
<head>
<script src="jquery.min.js">
</script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $(".test").hide();
  });
});
</script>
</head>
<body>

<h2 class="test">This is a heading</h2>
<p class="test">This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>
</body>
</html>

<< Previous || Next >>

How can u work by id selector?


Now i will teach how can jquery work by id selector...

Syntax:

 $("# id name").hide()


Now just copy this code on notepad and see....



<!DOCTYPE html>
<html>
<head>
<script src="jquery.min.js">
</script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("#test").hide();
  });
});
</script>
</head>

<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p id="test">This is another paragraph.</p>
<button>Click me</button>
</body>

</html>

<< Previous || Next >>


Saturday, February 2, 2013

First programme in jquery


Please first download this file "jquery.min.js".

Now try it just copy and paste it.....Then see how it work

<!DOCTYPE html>
<html>
<head>
<script src="jquery.min.js">
</script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    $("p").hide();
  });
});
</script>
</head>

<body>
<h2>This is a heading</h2>
<p>This is a paragraph.</p>
<p>This is another paragraph.</p>
<button>Click me</button>
</body>
</html>

<< Previous || Next >>
This Tutorial written by Md.Tofazzal Haque

How can use event?


All of this you have to use into Document Ready Event
 
    $(document).ready(function(){

   // jQuery methods go here...

    });

Now i introduced one more event which is used in our event example.

     $("button").click(function(){

       // jQuery methods go here...

     });

<< Previous || Next>>

This Tutorial written by Md.Tofazzal Haque

JQUERY SYNTAX


JQUERY SYNTAX is:

 $(selector).action();

you can use it like this:

     $(this).hide() -It is used for hides the current element which is select by $(this).

     $("p").hide() -It is used to hide all <p> elements.When this function find HTML tag <p></p>,it will hide all element of this tag.

     $(".test").hide() -It is used to  hide all elements with class="test".

     $("#test").hide() -It is used to hide the element with id="test".

<< Previous || Next >>

This Tutorial written by Md.Tofazzal Haque

Install jquery


All of this you have use jquery plugins which contain huge javascript code.
You get it in google search.

There are several ways to start using jQuery on your web site. You can:

    Download the jQuery library from jQuery.com
    Include jQuery from a CDN, like Google

you can use it like this

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>  for google.

<script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.3.min.js"></script> for Microsoft .

<< Previous || Next >>

This Tutorial written by Md.Tofazzal Haque

Introduction of jQuery.


Before you start jquery you should have basic knowledge of HTML,CSS and JAVA SCRIPT.
Then i will say what is JQUERY?



Before you start jquery you should have basic knowledge of HTML,CSS and JAVA SCRIPT.
Then i will say what is JQUERY?

JQUERY means JAVASCRIPT QUERY.
Jquery is lightweight,means write less and do more or get more by javascript library.
We can do many javascript code in one JQUERY function or a line.
JQUERY can do easier JAVASCRIPT CODE, AJAX CALLING AND DOM MANIPULATE.
We can do such things by JQUERY like:
                 
    HTML/DOM manipulation
    CSS manipulation
    HTML event methods
    Effects and animations
    AJAX
    Utilities

Next Tutorial : Install jQuery

This Tutorial written by Md.Tofazzal Haque