Your SlideShare is downloading. ×
0
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
J Query Presentation
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

J Query Presentation

5,963

Published on

A presentation on jQuery, how you can use it on your website, with links to live examples.

A presentation on jQuery, how you can use it on your website, with links to live examples.

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
5,963
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
164
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Vishal Kumar<br />06131A1258<br />
  • 2. Introduction<br />Why you’re going to love jQuery!<br />
  • 3. Introduction<br />What we want to create?<br />Dynamic Live Websites<br />Effects filled <br />Fast, responsive sites<br />What do we have?<br />Flash<br />Java<br />Javascript<br />
  • 4. The Solution : jQuery<br />What is jQuery?<br />jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.<br />
  • 5. History of jQuery<br />Developed by John Resig<br />Released v1.0 on November 26th, 2006<br />Maintained as an Open Source software (dual licensed under MIT and GNU GPL)<br />Microsoft planning to integrate into Microsoft Visual Web Developer<br />Nokia planning to integrate into Web Run-Time platform<br />Currently on Version 1.4, released<br />
  • 6. Features of jQuery<br />DOM element selections using the cross-browser open source selector engine Sizzle<br />DOM traversal and modification<br />Events<br />CSS manipulation<br />Effects and animations<br />AJAX<br />Extensibility through plugins<br />Utilities - such as browser version and the each function.<br />
  • 7. A Few Examples<br />Forms<br />Chatboxes<br />Menus<br />Dropdowns<br />Sliders<br />Tabs<br />Slideshows<br />Games<br />
  • 8. jQuery Enhanced Forms<br />
  • 9. Menus and Dropdowns<br />
  • 10. Sliders and Slideshows<br />
  • 11. Technical Implementation<br />Because, after all, we are I.T. folks.<br />
  • 12. jQuery Object<br />The jQuery Object<br />Contains a reference to the DOM element<br />Has properties of the DOM element, like text, html, tags<br />Can be used to manipulate the DOM directly<br />Can be nested<br />Every jQuery Function Should return the same jQuery object<br />
  • 13. Using jQuery<br />Download the .JS file (23KB otal, minified)<br />Use the jQuery file hosted on Google’s Code servers<br />&amp;lt;html&amp;gt; <br /> &amp;lt;head&amp;gt; <br /> &amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;jquery.js&amp;quot;&amp;gt; &amp;lt;/script&amp;gt; <br /> &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt; &amp;lt;/script&amp;gt; <br /> &amp;lt;/head&amp;gt; <br /> &amp;lt;body&amp;gt; &amp;lt;a href=&amp;quot;http://jquery.com/&amp;quot;&amp;gt;jQuery&amp;lt;/a&amp;gt; &amp;lt;/body&amp;gt; <br />&amp;lt;/html&amp;gt;<br />
  • 14. jQuery Syntax<br />$(document).ready(function()<br />{ <br /> $(&amp;quot;a&amp;quot;).click(function(event)<br /> { <br /> alert(&amp;quot;Thanks for visiting!&amp;quot;); <br /> });<br />});<br />
  • 15. The $ Symbol<br />$ is the Shortcut for the jQuery Global Class<br />Use it to access any part of the DOM<br />Search by CSS to get the element.<br />Returns a jQuery object which can be futher manipulated<br />
  • 16. DOM Traversing<br />Document Object Model:<br />The way of representing the Elements of a Document as Objects<br />Way we represent HTML, XML, XHTML<br />From BODY, P, DIV, SPAN, etc. Any element can be accessed from its DOM structure<br />
  • 17. Chainable Functions<br />Chainable events: find this, do several things in succession<br />$(&amp;apos;#message2&amp;apos;).fadeIn(&amp;apos;slow&amp;apos;).addClass(&amp;apos;alert&amp;apos;).html(&amp;apos;Validate your markup!&amp;apos;);<br />Allows us to create complex yet easy to understand chains of actions<br />
  • 18. jQuery Animations<br />Animations<br />Built in<br />fadeIn()<br />fadeOut()<br />hide()<br />show()<br />slideDown()<br />slideUp()<br />toggle()<br />slideToggle()<br />fadeTo()<br />animate()<br />See also:<br />Easing Plug-in<br />jQuery User Interface: http://ui.jquery.com<br />
  • 19. When is the DOM Ready?<br />When is DOM ready?<br />We can use the ready() function to find out<br />$(document).ready(function() <br />{    // Write Code Here<br />});<br />
  • 20. CSS &amp; Attribute Matching<br />Search with Tags and CSS:<br />$(&amp;apos;p&amp;apos;);<br />$(&amp;apos;p.message&amp;apos;);<br />$(&amp;apos;#message .text&amp;apos;);<br />$(&amp;apos;ul#menu &amp;gt; li&amp;apos;);<br />$(&amp;apos;ul#menuul&amp;apos;);<br />Attribute Matching:<br />$(&amp;apos;img[@alt]&amp;apos;);<br />$(&amp;apos;a[@href*=google]&amp;apos;);<br />
  • 21. jQuery Events<br />Don&amp;apos;t add &amp;quot;onclick&amp;quot; to your markup: use jQuery to find and assign events<br />$(&amp;apos;#control&amp;apos;).click(function() {    $(&amp;apos;#message&amp;apos;).show().addClass(&amp;apos;alert&amp;apos;);});<br />$(&amp;apos;#control&amp;apos;).toggle(function() {    $(&amp;apos;#message&amp;apos;).show().addClass(&amp;apos;alert&amp;apos;);}, function(){    $(&amp;apos;#message&amp;apos;).removeClass(&amp;apos;alert&amp;apos;).hide();});<br />
  • 22. jQuery with Other Frameworks<br />Mootools<br />Prototype, etc<br />Other frameworks also use the $ shortcut<br />Add code like this before making any jQuery calls:<br />varfoo = jQuery.noConflict();<br />Then use it like this:<br />foo(&amp;apos;#message&amp;apos;).show();<br />
  • 23. AHAH !?!<br />AHAH style (Asynchronous HTML and HTTP)<br />Easiest way of creating Asynchronous sites<br />$(&amp;apos;#control&amp;apos;).click(function() <br /> {    $(&amp;apos;#message&amp;apos;).load(&amp;apos;current.php&amp;apos;);});<br />
  • 24. AJAX with jQuery<br />Asynchronous Javascript and XML<br />AJAX - Processing the feed<br />$(&amp;apos;#demo5-1&amp;apos;).click(function() { $(&amp;apos;#headline-container&amp;apos;).html(&amp;apos;&amp;apos;);    $.get(&amp;apos;headlines.xml&amp;apos;, function(rss){        $(rss).find(&amp;apos;item title&amp;apos;).each(function(index) {            $(&amp;apos;#headline-container&amp;apos;).append(&amp;apos;&amp;lt;p&amp;gt;&amp;apos; + $(this).text() + &amp;apos;&amp;lt;/p&amp;gt;&amp;apos;);        });    });});<br />
  • 25. Live Examples<br />I can’t believe its not Flash!<br />
  • 26. Links<br />Facebook Search: http://demos.9lessons.info/auto.htm<br />Photoslider: http://css-tricks.com/examples/AnythingSlider/#panel-5<br />Tabbed Manu: http://www.queness.com/resources/html/tabmenu/jquery-tabbed-menu-queness.html<br />Flip: http://lab.smashup.it/flip/<br />Gallery: http://visuallightbox.com/photo-gallery-with-lightbox-simple-html-demo.html<br />Zoom image: http://www.hotajax.org/demo/jquery/zoomimage/zoomimage/index.html<br />Mac Dock: http://nettuts.s3.cdn.plus.org/358_jquery/example%20files/all-examples.html<br />Site with jQuery: http://pupunzi.com/#welcome.html<br />3d Sphere in jQuery: http://www.devirtuoso.com/Examples/3D-Engine/sphere.html<br />Chat Noir: www.vishalkumar.in/works/jscat<br />
  • 27. Conclusion<br />Impressed?<br />
  • 28. Who’s using jQuery?<br />Google<br />Dell<br />Bank of America<br />Mozilla<br />Drupal<br />NetFlix<br />NBC<br />Digg<br />
  • 29. How can I learn and use jQuery<br />Check out jQuery.com Documentation<br />Sites like www.jquerytutorials.com<br />Plugins for many of the features<br />Apply it to any web based application<br />Change the way you develop websites, and bring life to the online experience!<br />
  • 30. Closing Remarks<br />Thank you for listening.<br />If you have any queries, please feel free to ask . <br />If you want to know how you can use a particular module of technology for your project or application, contact me at<br />vishalkumar@gmail.com<br />+91 9985 463 469<br />
  • 31. References<br />jQuery: www.jQuery.com<br />jQuery 1.4 Reference Guide(Jan 2010), Pack Publishing<br />www.noupe.com<br />www.jquerytutorials.com<br />http://www.webdesignerwall.com/tutorials/jquery-tutorials-for-designers/<br />www.google.com/images (search “jquery &amp;lt;feature&amp;gt;”)<br />

×