SlideShare une entreprise Scribd logo
1  sur  38
Kick start with jQueryKick start with jQuery
Ziaul Haq ZiaZiaul Haq Zia
Sr. Web Application Developer.
Liveoutsource Ltd.
www.jquerygeeek.com
twitter.com/jquerygeek
facebook.com/jquerygeek
About meAbout me
 JavaScript Library
 Fast and concise
 Simplifies HTML document traversing, event
handling, animating, and Ajax interactions.
 Designed to change the way that you write
JavaScript.
What is jQuery ?
 Lightweight :
24KB in size (Minified and Gzipped)
 CSS Compliant :
Support CSS 1-3
 Cross-browser :
IE 6.0+, FF 2+, Safari 3.0+, Opera 9.0+, Chrome.
 Community Support :
Blog, Forum, Tutorial, Plugins, Books and so…
 Write less, do more
Why we will use jQuery ?
With DOM :
var obj = document.getElementById('box');
if(obj.style.display == 'none'){
obj.style.display = 'block';
} else {
obj.style.display = 'none';
}
With jQuery:
$('#box').toggle();
Write less, do more
Google trends comparison on JS frameworks for last 1 year
http://www.google.com/trends?q=jQuery%2C+prototype%2C+yui%2C+dojo%2C+mootools&ctab=0&ge
Always Dominating
http://docs.jquery.com/Sites_Using_jQuery
Who using jQuery ?
Let’s start …..
www.jquery.com
Go to jQuery site
Download the latest version
<html>
<head>
<script language=“javascript” src=“path/jquery-
1.4.js"></script>
<script language=“javascript”>
$(document).ready(function(){
//All jQuery code will be here
alert(“I am running with jQuery”);
});
</script>
</head>
<body>
Body content.
</body>
</html>
Getting ready for working
Find some elements and Make object
Do some thing with that object
$(“p”).addClass(“myParagraph”);
$(“#myDiv”).show();
Basic work flow…
Find all p elements and make Object
Find element with myDiv id and make Object
Add class (myParagraph) on that element
Apply show() function on that element
CSS
div {
.............
}
#myDiv {
.............
}
.myClass {
.............
}
#menu ul li{
...............
}
Find element & Make object
Have to pass CSS selector
to $() [jQuery object]
jQuery
$(“div”).[Do something]
$(“#myDiv”).[........]
$(“.myClass”).[........]
$(“#menu ul li”).[........]
Get selector’s by filtering
 Basic Filters
 :even [$(“#myMenu li:even”)]
 :odd [$(“#myMenu li:odd”)]
 :first [$(“#myMenu li:first”)]
 :last [$(“#myMenu li:last”)]
 :eq(position number) [$(“#myMenu li:eq(2)”)]
 :gt(position number) [$(“#myMenu li:gt(0)”)]
 :lt(position number) [$(“#myMenu li:lt(3)”)]
…………………..
Get selector’s by filtering
 Content Filters
 :contains(text) [$(“#myMenu li:contains(‘Home’)”)]
 :has(selector) [$(“div:has(‘ul’)”)]
 :empty [$(“p:empty”)]
…………………..
Get selector’s by filtering
 Attribute Filters
 [attribute] [$(“p [class]”)]
 [attribute=value] [$(“div [id=‘master’]”)]
 [attribute!=value] [$(“.myClass [id!=‘common’]”)]
 [@attribute^=value] [$(“#myMenu li[@class^=‘menu’]”)]
…………………..
Get selector’s by filtering
 Form & Form Filters
 For all <input> field, use type for identity
 :text [$(“:text”)]
 :submit [$(“:submit”)]
 :checkbox [$(“:checkbox”)]
…………………………
 :checked [$(“input:checked”)]
 :disabled [$(“input:disabled”)]
 :selected [$(“select option:selected”)]
…………………..
Get selector’s by filtering
 Few More Filters
 :hidden [$(“p:hidden”)]
 :first-child [$(“div span:first-child”)]
 :last-child [$(“div span:last-child”)]
 :only-child [$(“div p:only-child”)]
…………………..
Apply actions on objects
<html>
<head>
<script language=“javascript” src=“path/jquery-
1.4.js"></script>
<script language=“javascript”>
$(document).ready(function(){
// Get jQuery object and put on myObj
var myObj = $(“any-selector”);
// Then apply actions on this object
});
</script>
</head>
<body> Body content.</body>
</html>
Apply actions on objects
 Attributes
 attr(), val(), html(), text(), css(), addClass(), removeClass() …..
myObj.val(); // Return value
myObj.val(value); // Assign value
myObj.attr(“title”); // Return attributes value
myObj.val({“title”:”myTitle”}); // Assign new attributes
………………………………..
 DOM Manipulation
 append(), appendTo(), after(), before(), empty(), clone() ………
myObj.append(“Hello guys”); // Insert content into element
myObj.after(“PHP Guru”); // Insert content after element
myObj.empty(); // Make the element’s empty
……………………………………
var myObj = $(“any-selector”);
Apply actions on objects
 Filtering & Finding
 eq(), hasClass(), children(), next(), prev() …..
myObj.eq(1); // Return second element of the object
myObj.children(); // Return all the entire elements of the object
myObj.next(); // Return next element of the object
………………………………..
 Effects
 hide(), show(), fadeIn(), fadeOut(), toggle(), slideToggle(), animate() …
myObj.hide(); // Make the element’s invisible
myObj.fadeIn(); // Make the invisible element’s visible with fading effect
myObj.toggle(); // Make the visible or invisible, based on status
…………………………………….
var myObj = $(“any-selector”);
Apply actions on objects
 Events
 click(), change(), bind(), submit(), mouseover() …..
myObj.click(function); // Fire the entire function after click
myObj.change(function); // Fire the entire function after change the value
myObj.submit(); // Will submit the entire form
………………………………..
 AJAX
 $.ajax(), $.post(), $.get(), load(), getJSON() ………….
$.post(
‘actionPage.php’, {name:’Zia’},
function(data){
// Do play with the ‘data’ object.
}, “json”);
var myObj = $(“any-selector”);
Lets see an AJAX example
<html>
<head>
<script language=“javascript” src=“path/jquery-
1.4.js"></script>
<script language=“javascript”>
$(document).ready(function(){
alert(“I am running with jQuery”);
});
</script>
</head>
<body>
<input type=“hidden” id=“hiddenVal”
name=“hiddenData” value=“jquerygeek”>
<div id=“container”></div>
</body>
</html>
Lets see an AJAX example
getInformation.php file
<?php
$myInfo = array(
"jquerygeek"=>array(
"name"=>"Ziaul Haq",
"email"=>"jquerygeek@gmail.com"
),
"phpguru"=>array(
"name"=>"Hasin Hyder",
"email"=>"phpfive@yahoo.com"
)
);
$myId = $_POST['myId'];
echo json_encode($myInfo[$myId]);
?>
Lets see an AJAX example
AJAX method’s section
<script language=“javascript”>
$(document).ready(function(){
$.post(
"getInformation.php",
{myId:$("#hiddenVal").val()},
function(infoData){
//infoData = {name:’Ziaul Haq’,
email:’jquerygeek@gmail.com’}
$(“#container”).empty().append(“Name :
”+infoData.name).append(“<br />Email :
”+infoData.email);
},"json");
});
</script>
Lets see an AJAX example
Get selected information on body
<body>
<input type=“hidden” id=“hiddenVal”
name=“hiddenData” value=“jquerygeek”>
<div id=“container”>
Name : Ziaul Haq <br />
Email : jquerygeek@gmail.com
</div>
</body>
Why JSON on AJAX
Object Literals
info = {
name:”Ziaul Haq”,
email:”jquerygeek@gmail.com”
}
info.name; // Ziaul Haq
info.email; // jquerygeek@gmail.com
One more point …
 Chaining methods
 Most of the jQuery methods return jQuery object
$(“#container”).empty()
.append(“Name : ”+infoData.name)
.append(“<br />Email : ”+infoData.email);
Resources
http://www.visualjquery.com
Visual jQuery
Let’s see some cool jQuery plugin
Some plugins
 Content Gallery
http://workshop.rs/projects/coin-slider/
Some plugins
 Photo gallery
http://leandrovieira.com/projects/jquery/lightbox/
Some plugins
 jQuery form validation
http://validity.thatscaptaintoyou.com/
Some plugins
 Tool tip (qTip)
http://craigsworks.com/projects/qtip/
Some plugins
 UI Tab
http://jqueryui.com/demos/tabs/
All plugins
 And many more…….
http://plugins.jquery.com/
Reference Books
https://www.packtpub.com/jquery-plugin-development-beginners-guide/book
https://www.packtpub.com/learning-jquery-1.3/book?mid=1802090m1d2r
http://www.manning.com/bibeault2/
Learning jQuery 1.3
jQuery Plugin Development Beginner's Guide
If anymore question or help need,
please mail me :
jquerygeek@gmail.com
Or
Contact me on :
www.jquerygeek.com
Thank You

Contenu connexe

Tendances

Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuerymanugoel2003
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony AppsKris Wallsmith
 
Advanced jQuery
Advanced jQueryAdvanced jQuery
Advanced jQuerysergioafp
 
A Short Introduction To jQuery
A Short Introduction To jQueryA Short Introduction To jQuery
A Short Introduction To jQuerySudar Muthu
 
Building Large jQuery Applications
Building Large jQuery ApplicationsBuilding Large jQuery Applications
Building Large jQuery ApplicationsRebecca Murphey
 
Javascript session june 2013 (iii) jquery json
Javascript session june 2013 (iii) jquery   jsonJavascript session june 2013 (iii) jquery   json
Javascript session june 2013 (iii) jquery jsonabksharma
 
Jquery optimization-tips
Jquery optimization-tipsJquery optimization-tips
Jquery optimization-tipsanubavam-techkt
 
How kris-writes-symfony-apps-london
How kris-writes-symfony-apps-londonHow kris-writes-symfony-apps-london
How kris-writes-symfony-apps-londonKris Wallsmith
 
How to increase Performance of Web Application using JQuery
How to increase Performance of Web Application using JQueryHow to increase Performance of Web Application using JQuery
How to increase Performance of Web Application using JQuerykolkatageeks
 
Game jump: frontend introduction #1
Game jump: frontend introduction #1Game jump: frontend introduction #1
Game jump: frontend introduction #1Sebastian Pożoga
 
Organizing Code with JavascriptMVC
Organizing Code with JavascriptMVCOrganizing Code with JavascriptMVC
Organizing Code with JavascriptMVCThomas Reynolds
 

Tendances (20)

Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
Jquery
JqueryJquery
Jquery
 
JQuery introduction
JQuery introductionJQuery introduction
JQuery introduction
 
jQuery
jQueryjQuery
jQuery
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony Apps
 
Advanced jQuery
Advanced jQueryAdvanced jQuery
Advanced jQuery
 
A Short Introduction To jQuery
A Short Introduction To jQueryA Short Introduction To jQuery
A Short Introduction To jQuery
 
Building Large jQuery Applications
Building Large jQuery ApplicationsBuilding Large jQuery Applications
Building Large jQuery Applications
 
Javascript session june 2013 (iii) jquery json
Javascript session june 2013 (iii) jquery   jsonJavascript session june 2013 (iii) jquery   json
Javascript session june 2013 (iii) jquery json
 
Jquery optimization-tips
Jquery optimization-tipsJquery optimization-tips
Jquery optimization-tips
 
Jquery Basics
Jquery BasicsJquery Basics
Jquery Basics
 
How kris-writes-symfony-apps-london
How kris-writes-symfony-apps-londonHow kris-writes-symfony-apps-london
How kris-writes-symfony-apps-london
 
How to increase Performance of Web Application using JQuery
How to increase Performance of Web Application using JQueryHow to increase Performance of Web Application using JQuery
How to increase Performance of Web Application using JQuery
 
Game jump: frontend introduction #1
Game jump: frontend introduction #1Game jump: frontend introduction #1
Game jump: frontend introduction #1
 
Jquery-overview
Jquery-overviewJquery-overview
Jquery-overview
 
JQuery UI
JQuery UIJQuery UI
JQuery UI
 
jQuery Essentials
jQuery EssentialsjQuery Essentials
jQuery Essentials
 
jQuery Presentasion
jQuery PresentasionjQuery Presentasion
jQuery Presentasion
 
Organizing Code with JavascriptMVC
Organizing Code with JavascriptMVCOrganizing Code with JavascriptMVC
Organizing Code with JavascriptMVC
 
The jQuery Divide
The jQuery DivideThe jQuery Divide
The jQuery Divide
 

En vedette

Optimizing AngularJS Application
Optimizing AngularJS ApplicationOptimizing AngularJS Application
Optimizing AngularJS ApplicationMd. Ziaul Haq
 
JQuery plugin development fundamentals
JQuery plugin development fundamentalsJQuery plugin development fundamentals
JQuery plugin development fundamentalsBastian Feder
 
Jquery plugin development
Jquery plugin developmentJquery plugin development
Jquery plugin developmentMd. Ziaul Haq
 
Jquery Plugin
Jquery PluginJquery Plugin
Jquery PluginRavi Mone
 

En vedette (6)

Optimizing AngularJS Application
Optimizing AngularJS ApplicationOptimizing AngularJS Application
Optimizing AngularJS Application
 
JQuery plugin development fundamentals
JQuery plugin development fundamentalsJQuery plugin development fundamentals
JQuery plugin development fundamentals
 
финфорум
финфорумфинфорум
финфорум
 
Jquery plugin development
Jquery plugin developmentJquery plugin development
Jquery plugin development
 
Jquery Plugin
Jquery PluginJquery Plugin
Jquery Plugin
 
The MEAN Stack
The MEAN StackThe MEAN Stack
The MEAN Stack
 

Similaire à Kick start with j query

Jquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsJquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsEPAM Systems
 
jQuery Rescue Adventure
jQuery Rescue AdventurejQuery Rescue Adventure
jQuery Rescue AdventureAllegient
 
international PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secretsinternational PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secretssmueller_sandsmedia
 
Unobtrusive javascript with jQuery
Unobtrusive javascript with jQueryUnobtrusive javascript with jQuery
Unobtrusive javascript with jQueryAngel Ruiz
 
A to Z about JQuery - Become Newbie to Expert Java Developer
A to Z about JQuery - Become Newbie to Expert Java DeveloperA to Z about JQuery - Become Newbie to Expert Java Developer
A to Z about JQuery - Become Newbie to Expert Java DeveloperManoj Bhuva
 
Introduzione JQuery
Introduzione JQueryIntroduzione JQuery
Introduzione JQueryorestJump
 
A Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NETA Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NETJames Johnson
 
JQuery_and_Ajax.pptx
JQuery_and_Ajax.pptxJQuery_and_Ajax.pptx
JQuery_and_Ajax.pptxAditiPawale1
 

Similaire à Kick start with j query (20)

Jquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsJquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript Basics
 
jQuery
jQueryjQuery
jQuery
 
J query training
J query trainingJ query training
J query training
 
jQuery Rescue Adventure
jQuery Rescue AdventurejQuery Rescue Adventure
jQuery Rescue Adventure
 
JQuery
JQueryJQuery
JQuery
 
international PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secretsinternational PHP2011_Bastian Feder_jQuery's Secrets
international PHP2011_Bastian Feder_jQuery's Secrets
 
Unobtrusive javascript with jQuery
Unobtrusive javascript with jQueryUnobtrusive javascript with jQuery
Unobtrusive javascript with jQuery
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
jQuery UI and Plugins
jQuery UI and PluginsjQuery UI and Plugins
jQuery UI and Plugins
 
A to Z about JQuery - Become Newbie to Expert Java Developer
A to Z about JQuery - Become Newbie to Expert Java DeveloperA to Z about JQuery - Become Newbie to Expert Java Developer
A to Z about JQuery - Become Newbie to Expert Java Developer
 
jQuery besic
jQuery besicjQuery besic
jQuery besic
 
jQuery quick tuts
jQuery quick tutsjQuery quick tuts
jQuery quick tuts
 
Jquery
JqueryJquery
Jquery
 
Introduzione JQuery
Introduzione JQueryIntroduzione JQuery
Introduzione JQuery
 
A Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NETA Rich Web experience with jQuery, Ajax and .NET
A Rich Web experience with jQuery, Ajax and .NET
 
J query
J queryJ query
J query
 
Unit3.pptx
Unit3.pptxUnit3.pptx
Unit3.pptx
 
J queryui
J queryuiJ queryui
J queryui
 
JQuery_and_Ajax.pptx
JQuery_and_Ajax.pptxJQuery_and_Ajax.pptx
JQuery_and_Ajax.pptx
 

Kick start with j query

  • 1. Kick start with jQueryKick start with jQuery
  • 2. Ziaul Haq ZiaZiaul Haq Zia Sr. Web Application Developer. Liveoutsource Ltd. www.jquerygeeek.com twitter.com/jquerygeek facebook.com/jquerygeek About meAbout me
  • 3.  JavaScript Library  Fast and concise  Simplifies HTML document traversing, event handling, animating, and Ajax interactions.  Designed to change the way that you write JavaScript. What is jQuery ?
  • 4.  Lightweight : 24KB in size (Minified and Gzipped)  CSS Compliant : Support CSS 1-3  Cross-browser : IE 6.0+, FF 2+, Safari 3.0+, Opera 9.0+, Chrome.  Community Support : Blog, Forum, Tutorial, Plugins, Books and so…  Write less, do more Why we will use jQuery ?
  • 5. With DOM : var obj = document.getElementById('box'); if(obj.style.display == 'none'){ obj.style.display = 'block'; } else { obj.style.display = 'none'; } With jQuery: $('#box').toggle(); Write less, do more
  • 6. Google trends comparison on JS frameworks for last 1 year http://www.google.com/trends?q=jQuery%2C+prototype%2C+yui%2C+dojo%2C+mootools&ctab=0&ge Always Dominating
  • 9. www.jquery.com Go to jQuery site Download the latest version
  • 10. <html> <head> <script language=“javascript” src=“path/jquery- 1.4.js"></script> <script language=“javascript”> $(document).ready(function(){ //All jQuery code will be here alert(“I am running with jQuery”); }); </script> </head> <body> Body content. </body> </html> Getting ready for working
  • 11. Find some elements and Make object Do some thing with that object $(“p”).addClass(“myParagraph”); $(“#myDiv”).show(); Basic work flow… Find all p elements and make Object Find element with myDiv id and make Object Add class (myParagraph) on that element Apply show() function on that element
  • 12. CSS div { ............. } #myDiv { ............. } .myClass { ............. } #menu ul li{ ............... } Find element & Make object Have to pass CSS selector to $() [jQuery object] jQuery $(“div”).[Do something] $(“#myDiv”).[........] $(“.myClass”).[........] $(“#menu ul li”).[........]
  • 13. Get selector’s by filtering  Basic Filters  :even [$(“#myMenu li:even”)]  :odd [$(“#myMenu li:odd”)]  :first [$(“#myMenu li:first”)]  :last [$(“#myMenu li:last”)]  :eq(position number) [$(“#myMenu li:eq(2)”)]  :gt(position number) [$(“#myMenu li:gt(0)”)]  :lt(position number) [$(“#myMenu li:lt(3)”)] …………………..
  • 14. Get selector’s by filtering  Content Filters  :contains(text) [$(“#myMenu li:contains(‘Home’)”)]  :has(selector) [$(“div:has(‘ul’)”)]  :empty [$(“p:empty”)] …………………..
  • 15. Get selector’s by filtering  Attribute Filters  [attribute] [$(“p [class]”)]  [attribute=value] [$(“div [id=‘master’]”)]  [attribute!=value] [$(“.myClass [id!=‘common’]”)]  [@attribute^=value] [$(“#myMenu li[@class^=‘menu’]”)] …………………..
  • 16. Get selector’s by filtering  Form & Form Filters  For all <input> field, use type for identity  :text [$(“:text”)]  :submit [$(“:submit”)]  :checkbox [$(“:checkbox”)] …………………………  :checked [$(“input:checked”)]  :disabled [$(“input:disabled”)]  :selected [$(“select option:selected”)] …………………..
  • 17. Get selector’s by filtering  Few More Filters  :hidden [$(“p:hidden”)]  :first-child [$(“div span:first-child”)]  :last-child [$(“div span:last-child”)]  :only-child [$(“div p:only-child”)] …………………..
  • 18. Apply actions on objects <html> <head> <script language=“javascript” src=“path/jquery- 1.4.js"></script> <script language=“javascript”> $(document).ready(function(){ // Get jQuery object and put on myObj var myObj = $(“any-selector”); // Then apply actions on this object }); </script> </head> <body> Body content.</body> </html>
  • 19. Apply actions on objects  Attributes  attr(), val(), html(), text(), css(), addClass(), removeClass() ….. myObj.val(); // Return value myObj.val(value); // Assign value myObj.attr(“title”); // Return attributes value myObj.val({“title”:”myTitle”}); // Assign new attributes ………………………………..  DOM Manipulation  append(), appendTo(), after(), before(), empty(), clone() ……… myObj.append(“Hello guys”); // Insert content into element myObj.after(“PHP Guru”); // Insert content after element myObj.empty(); // Make the element’s empty …………………………………… var myObj = $(“any-selector”);
  • 20. Apply actions on objects  Filtering & Finding  eq(), hasClass(), children(), next(), prev() ….. myObj.eq(1); // Return second element of the object myObj.children(); // Return all the entire elements of the object myObj.next(); // Return next element of the object ………………………………..  Effects  hide(), show(), fadeIn(), fadeOut(), toggle(), slideToggle(), animate() … myObj.hide(); // Make the element’s invisible myObj.fadeIn(); // Make the invisible element’s visible with fading effect myObj.toggle(); // Make the visible or invisible, based on status ……………………………………. var myObj = $(“any-selector”);
  • 21. Apply actions on objects  Events  click(), change(), bind(), submit(), mouseover() ….. myObj.click(function); // Fire the entire function after click myObj.change(function); // Fire the entire function after change the value myObj.submit(); // Will submit the entire form ………………………………..  AJAX  $.ajax(), $.post(), $.get(), load(), getJSON() …………. $.post( ‘actionPage.php’, {name:’Zia’}, function(data){ // Do play with the ‘data’ object. }, “json”); var myObj = $(“any-selector”);
  • 22. Lets see an AJAX example <html> <head> <script language=“javascript” src=“path/jquery- 1.4.js"></script> <script language=“javascript”> $(document).ready(function(){ alert(“I am running with jQuery”); }); </script> </head> <body> <input type=“hidden” id=“hiddenVal” name=“hiddenData” value=“jquerygeek”> <div id=“container”></div> </body> </html>
  • 23. Lets see an AJAX example getInformation.php file <?php $myInfo = array( "jquerygeek"=>array( "name"=>"Ziaul Haq", "email"=>"jquerygeek@gmail.com" ), "phpguru"=>array( "name"=>"Hasin Hyder", "email"=>"phpfive@yahoo.com" ) ); $myId = $_POST['myId']; echo json_encode($myInfo[$myId]); ?>
  • 24. Lets see an AJAX example AJAX method’s section <script language=“javascript”> $(document).ready(function(){ $.post( "getInformation.php", {myId:$("#hiddenVal").val()}, function(infoData){ //infoData = {name:’Ziaul Haq’, email:’jquerygeek@gmail.com’} $(“#container”).empty().append(“Name : ”+infoData.name).append(“<br />Email : ”+infoData.email); },"json"); }); </script>
  • 25. Lets see an AJAX example Get selected information on body <body> <input type=“hidden” id=“hiddenVal” name=“hiddenData” value=“jquerygeek”> <div id=“container”> Name : Ziaul Haq <br /> Email : jquerygeek@gmail.com </div> </body>
  • 26. Why JSON on AJAX Object Literals info = { name:”Ziaul Haq”, email:”jquerygeek@gmail.com” } info.name; // Ziaul Haq info.email; // jquerygeek@gmail.com
  • 27. One more point …  Chaining methods  Most of the jQuery methods return jQuery object $(“#container”).empty() .append(“Name : ”+infoData.name) .append(“<br />Email : ”+infoData.email);
  • 29. Let’s see some cool jQuery plugin
  • 30. Some plugins  Content Gallery http://workshop.rs/projects/coin-slider/
  • 31. Some plugins  Photo gallery http://leandrovieira.com/projects/jquery/lightbox/
  • 32. Some plugins  jQuery form validation http://validity.thatscaptaintoyou.com/
  • 33. Some plugins  Tool tip (qTip) http://craigsworks.com/projects/qtip/
  • 34. Some plugins  UI Tab http://jqueryui.com/demos/tabs/
  • 35. All plugins  And many more……. http://plugins.jquery.com/
  • 37. If anymore question or help need, please mail me : jquerygeek@gmail.com Or Contact me on : www.jquerygeek.com