SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Downloaden Sie, um offline zu lesen
jQuery Way
                               Right path to Javascript and jQuery




Thursday, September 23, 2010
Web Triad

                               Javascript         HTML




                                            CSS




Thursday, September 23, 2010
Web Triad

                                jQuery

                               Javascript         HTML




                                            CSS




Thursday, September 23, 2010
Structure




                                    *http://developer.yahoo.com/performance/rules.html




Thursday, September 23, 2010
Real Structure




Thursday, September 23, 2010
jQuery: Start




Thursday, September 23, 2010
jQuery: Start

                                    =




Thursday, September 23, 2010
jQuery: Start

                                     =

                                  <img />
                                 <script />
                                 <style />

Thursday, September 23, 2010
DOMReady




Thursday, September 23, 2010
jQuery - Selectors


                           $(‘selectors’)


Thursday, September 23, 2010
jQuery - Selectors
                                         $(‘selectors’)
 <input                 id=”txt-email” class=”.input-text” type=”text” name=”email” />




                                                       *http://api.jquery.com/category/selectors/


Thursday, September 23, 2010
jQuery - Selectors
                                         $(‘selectors’)
 <input                 id=”txt-email” class=”.input-text” type=”text” name=”email” />
  $(‘input’)




                                                       *http://api.jquery.com/category/selectors/


Thursday, September 23, 2010
jQuery - Selectors
                                          $(‘selectors’)
 <input                 id=”txt-email” class=”.input-text” type=”text” name=”email” />
  $(‘input’)            $(‘#txt-email’)




                                                       *http://api.jquery.com/category/selectors/


Thursday, September 23, 2010
jQuery - Selectors
                                            $(‘selectors’)
 <input                 id=”txt-email” class=”.input-text” type=”text” name=”email” />
  $(‘input’)            $(‘#txt-email’)   $(‘.input-text’)




                                                             *http://api.jquery.com/category/selectors/


Thursday, September 23, 2010
jQuery - Selectors
                                            $(‘selectors’)
 <input                 id=”txt-email” class=”.input-text” type=”text” name=”email” />
  $(‘input’)            $(‘#txt-email’)   $(‘.input-text’)                       $(‘input[name=email]’)




                                                             *http://api.jquery.com/category/selectors/


Thursday, September 23, 2010
jQuery - What It Can Do?

                    • Event Handler
                    • Traversing
                    • Manipulating
                    • Helper
                    • Effect
                    • AJAX
Thursday, September 23, 2010
jQuery - Event Handler
                $(‘selectors’) .click( function() { ... } );
                                .bind(‘click’, function() { ... } );

                                .click(someFunction);




                                                  *http://api.jquery.com/category/events/
Thursday, September 23, 2010
jQuery - Traversing
                $(‘selectors’) .find(‘selectors’);
                                   .filter(‘selectors’);
                                   .parent();
                                   .parents(‘selectors’)
                                   .each(function(index, element) { ... })




                                                  *http://api.jquery.com/category/traversing/
Thursday, September 23, 2010
jQuery - Manipulating
                $(‘selectors’) .addClass(‘className’);
                               .removeClass(‘className’);
                               .css(‘name’, ‘value’);
                               .attr(‘name’, ‘value’)
                               .remove()
                               .html(‘<div />)
                               .append(‘<div />’)


                                         *http://api.jquery.com/category/manipulation/
Thursday, September 23, 2010
jQuery - Helper
                $(‘selectors’) .hasClass(‘className’);
                                  .text(‘textContent’);
                                  .val(‘value’);
                                  .val() - Returns value




Thursday, September 23, 2010
jQuery - Effect
                $(‘selectors’) .show();
                                 .show(‘slow|fast’);
                                 .hide();
                                 .toggle()
                                 .slideUp()
                                 .slideDown()
                                 .fadeIn()
                                 .fadeOut()

                                                 *http://api.jquery.com/category/effects/
Thursday, September 23, 2010
jQuery - AJAX
                $.ajax(
                  url: ‘ajax-path’,
                  type: ‘post’,
                  dataType: ‘json’,
                  success: function(data) {
                    // ...
                  }
                )


Thursday, September 23, 2010
jQuery - AJAX

                $.post(‘ajax-path’, { name: val },
                  success: function(data) {
                     // ...
                  },
                  ‘json’
                )



Thursday, September 23, 2010
$(jQuery).stop();

                Facebook: http://facebook.com/ferry.mulyono
                Twitter: @ferrymulyono




Thursday, September 23, 2010

Weitere ähnliche Inhalte

Was ist angesagt?

Touch/Mobile Websites with jQuery Mobile - Boise Code Camp 2013
Touch/Mobile Websites with jQuery Mobile - Boise Code Camp 2013Touch/Mobile Websites with jQuery Mobile - Boise Code Camp 2013
Touch/Mobile Websites with jQuery Mobile - Boise Code Camp 2013
Brett Adler
 
Declarations sample
Declarations   sampleDeclarations   sample
Declarations sample
aslamsan
 

Was ist angesagt? (13)

DeprecatedAPI로 알아보는 SwiftUI
DeprecatedAPI로 알아보는 SwiftUIDeprecatedAPI로 알아보는 SwiftUI
DeprecatedAPI로 알아보는 SwiftUI
 
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
 
JQuery introduction
JQuery introductionJQuery introduction
JQuery introduction
 
Advanced jQuery
Advanced jQueryAdvanced jQuery
Advanced jQuery
 
Everything You Need to Know in Order to Start Using jQuery
Everything You Need to Know in Order to Start Using jQueryEverything You Need to Know in Order to Start Using jQuery
Everything You Need to Know in Order to Start Using jQuery
 
Sharepoint 2013 - un slider JSSOR sur bib Images
Sharepoint 2013 - un slider JSSOR sur bib ImagesSharepoint 2013 - un slider JSSOR sur bib Images
Sharepoint 2013 - un slider JSSOR sur bib Images
 
Touch/Mobile Websites with jQuery Mobile - Boise Code Camp 2013
Touch/Mobile Websites with jQuery Mobile - Boise Code Camp 2013Touch/Mobile Websites with jQuery Mobile - Boise Code Camp 2013
Touch/Mobile Websites with jQuery Mobile - Boise Code Camp 2013
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony Apps
 
jQuery Selectors
jQuery SelectorsjQuery Selectors
jQuery Selectors
 
How kris-writes-symfony-apps-london
How kris-writes-symfony-apps-londonHow kris-writes-symfony-apps-london
How kris-writes-symfony-apps-london
 
jQuery besic
jQuery besicjQuery besic
jQuery besic
 
Declarations sample
Declarations   sampleDeclarations   sample
Declarations sample
 
Leveraging jQuery's Special Events API (JSConf 2012)
Leveraging jQuery's Special Events API (JSConf 2012)Leveraging jQuery's Special Events API (JSConf 2012)
Leveraging jQuery's Special Events API (JSConf 2012)
 

Andere mochten auch (7)

Dzejas pasākums "Svecēm piestāv dzeja" Gaujienas bibliotēkā
Dzejas pasākums "Svecēm piestāv dzeja" Gaujienas bibliotēkāDzejas pasākums "Svecēm piestāv dzeja" Gaujienas bibliotēkā
Dzejas pasākums "Svecēm piestāv dzeja" Gaujienas bibliotēkā
 
Māksliniecei M. Stārastei - 100
Māksliniecei M. Stārastei - 100Māksliniecei M. Stārastei - 100
Māksliniecei M. Stārastei - 100
 
Dzejas kafejnīca Gaujienā
Dzejas kafejnīca GaujienāDzejas kafejnīca Gaujienā
Dzejas kafejnīca Gaujienā
 
Banaba ppt by Natural Remedies
Banaba ppt by Natural RemediesBanaba ppt by Natural Remedies
Banaba ppt by Natural Remedies
 
Steven Nichols
Steven Nichols Steven Nichols
Steven Nichols
 
Proyecto mundo de dulces ca3 4
Proyecto mundo de dulces ca3 4Proyecto mundo de dulces ca3 4
Proyecto mundo de dulces ca3 4
 
2009 Region 9 Champions
2009 Region 9 Champions2009 Region 9 Champions
2009 Region 9 Champions
 

Ähnlich wie jQuery Way

Cleaner, Leaner, Meaner: Refactoring your jQuery
Cleaner, Leaner, Meaner: Refactoring your jQueryCleaner, Leaner, Meaner: Refactoring your jQuery
Cleaner, Leaner, Meaner: Refactoring your jQuery
Rebecca Murphey
 
The Tech Side of Project Argo
The Tech Side of Project ArgoThe Tech Side of Project Argo
The Tech Side of Project Argo
Wesley Lindamood
 
Week 4 - jQuery + Ajax
Week 4 - jQuery + AjaxWeek 4 - jQuery + Ajax
Week 4 - jQuery + Ajax
baygross
 
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
smueller_sandsmedia
 
presentation_jquery_ppt.pptx
presentation_jquery_ppt.pptxpresentation_jquery_ppt.pptx
presentation_jquery_ppt.pptx
azz71
 
2a-JQuery AJAX.pptx
2a-JQuery AJAX.pptx2a-JQuery AJAX.pptx
2a-JQuery AJAX.pptx
Le Hung
 

Ähnlich wie jQuery Way (20)

The jQuery Divide
The jQuery DivideThe jQuery Divide
The jQuery Divide
 
Cleaner, Leaner, Meaner: Refactoring your jQuery
Cleaner, Leaner, Meaner: Refactoring your jQueryCleaner, Leaner, Meaner: Refactoring your jQuery
Cleaner, Leaner, Meaner: Refactoring your jQuery
 
Desenvolvendo Aplicativos Sociais com Rails 3
Desenvolvendo Aplicativos Sociais com Rails 3Desenvolvendo Aplicativos Sociais com Rails 3
Desenvolvendo Aplicativos Sociais com Rails 3
 
The Tech Side of Project Argo
The Tech Side of Project ArgoThe Tech Side of Project Argo
The Tech Side of Project Argo
 
SilverStripe CMS JavaScript Refactoring
SilverStripe CMS JavaScript RefactoringSilverStripe CMS JavaScript Refactoring
SilverStripe CMS JavaScript Refactoring
 
jQuery Basic API
jQuery Basic APIjQuery Basic API
jQuery Basic API
 
Jquery
JqueryJquery
Jquery
 
Week 4 - jQuery + Ajax
Week 4 - jQuery + AjaxWeek 4 - jQuery + Ajax
Week 4 - jQuery + Ajax
 
Organizing Code with JavascriptMVC
Organizing Code with JavascriptMVCOrganizing Code with JavascriptMVC
Organizing Code with JavascriptMVC
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
 
jQuery - Chapter 3 - Effects
jQuery - Chapter 3 - Effects  jQuery - Chapter 3 - Effects
jQuery - Chapter 3 - Effects
 
dojo.things()
dojo.things()dojo.things()
dojo.things()
 
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
 
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
 
presentation_jquery_ppt.pptx
presentation_jquery_ppt.pptxpresentation_jquery_ppt.pptx
presentation_jquery_ppt.pptx
 
2a-JQuery AJAX.pptx
2a-JQuery AJAX.pptx2a-JQuery AJAX.pptx
2a-JQuery AJAX.pptx
 
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
 
Mongodb railscamphh
Mongodb railscamphhMongodb railscamphh
Mongodb railscamphh
 
Prototype Framework
Prototype FrameworkPrototype Framework
Prototype Framework
 
Jquery- One slide completing all JQuery
Jquery- One slide completing all JQueryJquery- One slide completing all JQuery
Jquery- One slide completing all JQuery
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

jQuery Way

  • 1. jQuery Way Right path to Javascript and jQuery Thursday, September 23, 2010
  • 2. Web Triad Javascript HTML CSS Thursday, September 23, 2010
  • 3. Web Triad jQuery Javascript HTML CSS Thursday, September 23, 2010
  • 4. Structure *http://developer.yahoo.com/performance/rules.html Thursday, September 23, 2010
  • 7. jQuery: Start = Thursday, September 23, 2010
  • 8. jQuery: Start = <img /> <script /> <style /> Thursday, September 23, 2010
  • 10. jQuery - Selectors $(‘selectors’) Thursday, September 23, 2010
  • 11. jQuery - Selectors $(‘selectors’) <input id=”txt-email” class=”.input-text” type=”text” name=”email” /> *http://api.jquery.com/category/selectors/ Thursday, September 23, 2010
  • 12. jQuery - Selectors $(‘selectors’) <input id=”txt-email” class=”.input-text” type=”text” name=”email” /> $(‘input’) *http://api.jquery.com/category/selectors/ Thursday, September 23, 2010
  • 13. jQuery - Selectors $(‘selectors’) <input id=”txt-email” class=”.input-text” type=”text” name=”email” /> $(‘input’) $(‘#txt-email’) *http://api.jquery.com/category/selectors/ Thursday, September 23, 2010
  • 14. jQuery - Selectors $(‘selectors’) <input id=”txt-email” class=”.input-text” type=”text” name=”email” /> $(‘input’) $(‘#txt-email’) $(‘.input-text’) *http://api.jquery.com/category/selectors/ Thursday, September 23, 2010
  • 15. jQuery - Selectors $(‘selectors’) <input id=”txt-email” class=”.input-text” type=”text” name=”email” /> $(‘input’) $(‘#txt-email’) $(‘.input-text’) $(‘input[name=email]’) *http://api.jquery.com/category/selectors/ Thursday, September 23, 2010
  • 16. jQuery - What It Can Do? • Event Handler • Traversing • Manipulating • Helper • Effect • AJAX Thursday, September 23, 2010
  • 17. jQuery - Event Handler $(‘selectors’) .click( function() { ... } ); .bind(‘click’, function() { ... } ); .click(someFunction); *http://api.jquery.com/category/events/ Thursday, September 23, 2010
  • 18. jQuery - Traversing $(‘selectors’) .find(‘selectors’); .filter(‘selectors’); .parent(); .parents(‘selectors’) .each(function(index, element) { ... }) *http://api.jquery.com/category/traversing/ Thursday, September 23, 2010
  • 19. jQuery - Manipulating $(‘selectors’) .addClass(‘className’); .removeClass(‘className’); .css(‘name’, ‘value’); .attr(‘name’, ‘value’) .remove() .html(‘<div />) .append(‘<div />’) *http://api.jquery.com/category/manipulation/ Thursday, September 23, 2010
  • 20. jQuery - Helper $(‘selectors’) .hasClass(‘className’); .text(‘textContent’); .val(‘value’); .val() - Returns value Thursday, September 23, 2010
  • 21. jQuery - Effect $(‘selectors’) .show(); .show(‘slow|fast’); .hide(); .toggle() .slideUp() .slideDown() .fadeIn() .fadeOut() *http://api.jquery.com/category/effects/ Thursday, September 23, 2010
  • 22. jQuery - AJAX $.ajax( url: ‘ajax-path’, type: ‘post’, dataType: ‘json’, success: function(data) { // ... } ) Thursday, September 23, 2010
  • 23. jQuery - AJAX $.post(‘ajax-path’, { name: val }, success: function(data) { // ... }, ‘json’ ) Thursday, September 23, 2010
  • 24. $(jQuery).stop(); Facebook: http://facebook.com/ferry.mulyono Twitter: @ferrymulyono Thursday, September 23, 2010