SlideShare a Scribd company logo
1 of 62
jQuery in Rails
     Louie Zhao
      Rails Consultant

    IN-SRC Studio




             1
Problem

• JavaScript programming can be hard
 • Completely dynamic language
 • JavaScript, by itself, isn’t useful

                     2
!"#$%"&'()$*$+,-./(0%12(%3'(/(0%)456"27"/(89%"&'(9:;
<,#$8!"#$%$*$=;$%$>$%"&'()1'(02%?;$%@@:$A
$$!"#$#,B)$*$%"&'()C%D12(%3'(/(0%)456"27"/(89%#9:;
$$<,#8!"#$E$*$F;$E$>$#,B)1'(02%?;$E$@*$G:$A
!"#$%&'()*+,$-)%./)01203,4'5446(67*448,*99'(544(6:
$$$$E<$8HI8JK):,++8)KL:I1%()%8#,B)CED1-'"))7"/(::$A
$$$$$$#,B)CED1-'"))7"/($@*$9$,++9;
$$$$M
$$M
M




                         3
!"#$%"&'()$*$+,-./(0%12(%3'(/(0%)456"27"/(89%"&'(9:;
<,#$8!"#$%$*$=;$%$>$%"&'()1'(02%?;$%@@:$A
$$!"#$#,B)$*$%"&'()C%D12(%3'(/(0%)456"27"/(89%#9:;
$$<,#8!"#$E$*$F;$E$>$#,B)1'(02%?;$E$@*$G:$A
$$$$E<$8HI8JK):,++8)KL:I1%()%8#,B)CED1-'"))7"/(::$A
$$$$$$#,B)CED1-'"))7"/($@*$9$,++9;
$$$$M
$$M
M




                         3
3
3
!"#$%&'()*+,$-)%./)01203,4'5446(67*448,*99'(544(6:




                        3
3
JavaScript Library


• Drastically simplify DOM, Ajax, Animation


                     4
5
jQuery


• An open source JavaScript library that
  simplifies the interaction between HTML
  and JavaScript.




                     6
twitter.com       time.com    microsoft.com




amazon.com      wordpress.com      ibm.com




                      7
8
jQuery

• Cross Browser
• Small
• Lean API, fun coding

                     9
jQuery Overview

• Selector & Chaining
• DOM manipulation
• Events
• Effects
• Ajax
                    10
Selector & Chaining

$(selector).method1().method2().method3();




      $('#goAway').hide().addClass('incognito');




                               11
Selector

• Basic CSS selectors
• Positional selectors
• Custom jQuery selectors

                   12
Basic CSS Selector


   $('li>p')




         13
Basic CSS Selector


$('div.someClass')




          14
Basic CSS Selector


$('#testButton')




          15
Basic CSS Selector


 $('img[alt]')




         16
Basic CSS Selector


$('a[href$=.pdf]')




           17
Basic CSS Selector


$('button[id*=test]')




             18
Positional Selectors


   $('p:first')




           19
Positional Selectors


$('img[src$=.png]:first')




               20
Positional Selectors


$('button.small:last')




              21
Positional Selectors


$('li:first-child')




             22
Positional Selectors


$('a:only-child')




           23
Positional Selectors

$('li:nth-child(2)')
$('li:nth-child(odd)')
$('li:nth-child(5n)')
$('li:nth-child(5n+1)')

              24
Positional Selectors

$('.someClass:eq(1)')
$('.someClass:gt(1)')
$('.someClass:lt(4)')



             25
Custom Selectors
$(':button:hidden')
$('input[name=myRadioGroup]:radio:checked')
$(':text:disabled')
$('#xyz p :header')
$('option:not(:selected)')
$('#myForm button:not(.someClass)')
$('select[name=choices] :selected')
$('p:contains(coffee)')



                        26
Add / Remove

 $('div').css('font-weight','bold').add('p').css('color','red');

$('body *').css('font-weight','bold').not('p').css('color','red');




                                             27
Find / Slicing

$('div').css('background-color','blue').find('img').css('border','1px
solid aqua');




                $('body *').slice(2,3).hide();




                                   28
Matching by
      Relationship

.parents("tr:first")




             29
Map

var values = $('#myForm :input').map(function(){
  return $(this).val();
});




                            30
Controlling Chaining

$('div').add('p').css('color','red').end().hide();




$('div').css('background-
color','yellow').children('img').css('border','4px ridge
maroon').andSelf().css('margin','4em');




                                   31
DOM Manipulation
• Changing contents
      .html("<p>This is a paragraph.</p>")

      .text("<p>This is a paragraph.</p>")




                          32
DOM Manipulation

• Inserting inside
 • append(content)
 • appendTo(selector)
 • prepend(content)
 • prependTo(selector)
                   33
DOM Manipulation

• Inserting outside
 • after(content)
 • insertAfter(selector)
 • before(content)
 • insertBefore(selector)
                    34
DOM Manipulation

• Inserting around
• Replacing
• Removing
• Copying

                     35
Events

• Page Load
• Event Handling
• Live Events
• Event Helpers

                   36
Events
• Run after DOM, but before images
   $(document).ready(function() {});




                       37
Effects




   38
Ajax
• Cross browser
              $.ajax();

              $.load();

              $.get();

              $.post();


                   39
jQuery UI


• Interactions
• Widgets


                 40
Interactions

• Draggable
• Droppable
• Resizable
• Selectable
• Sortable
               41
Widgets
• Accordion
• Date picker
• Dialog
• Progress Bar
• Slider
• Tabs
                 42
Prototype - Controller

class BooksController < ApplicationController
 def create
   @book = Book.create!(params[:book])
   respond_to do |format|
    format.html { redirect_to books_path }
    format.js
   end
 end
end




                               43
Prototype - View
<!-- layouts/application.rhtml -->
<%= javascript_include_tag :defaults %>

<!-- layouts/show.rhtml -->
<% form_remote_for :book, :url => books_path %>
  ....
<% end %>

<!-- app/views/books/create.js.rjs -->
page.insert_html :bottom, :books, :partial => 'book'




                               44
jQuery - View
<!-- layouts/application.rhtml -->
<%= javascript_include_tag 'jquery', 'jquery-ui', 'application' %>



<!-- public/javascripts/applicaton.js -->
$(document).ready(function() {
  $("#new_book").submit(function() {
    $.post($(this).attr("action"), $(this).serialize(), null, "script")
    return false;
  });
});


<!-- app/views/books/create.js.erb -->
$("#books").append("<%= escape_javascript(render(:partial =>
@book)) %>");

                                       45
jQuery - View

jQuery.fn.submitWithAjax = function() {
  this.submit(function() {
    $.post($(this).attr("action"), $(this).serialize(), null, "script")
    return false;
  });
};

$(document).ready(function() {
  $("#new_book").submitWithAjax();
});




                                            46
delete
<tr id="book_<%= book.id %>">
 <td><%= h book.title %></td>
 <td><%= h book.author %></td>
 <td><%= book.price %></td>
 <td><%= book.published_on.to_s %></td>
 <td><%= link_to 'X', book_path(book), :method => :delete %></td>
</tr>                                 !"#$%&'(&)*+,"-#.#*#/$&012%34&-2"325'212%367.$-1789#
                                       .4:3;'24/(:<'";#*#7%$%279#3=(:4<"-2%3>$/24"<<2%/?=('/6.89#
                                       .4123=$/#*#7@ABC79#.4"&3($%#*#3=(:4=-2.9,"-#1#*#
                                       /$&012%34&-2"325'212%367(%<03789#14:23D33-(E032673;<27F#
                                       7=(//2%789#14:23D33-(E03267%"127F#7G123=$/789#14:23D33-(E032
                                       67,"'027F#7/2'232789#.4"<<2%/?=('/6189,"-#:#*#
class BooksController < ApplicationController
                                       /$&012%34&-2"325'212%367(%<03789#:4:23D33-(E032673;<27F#
 def destroy                           7=(//2%789#:4:23D33-(E03267%"127F#7"03=2%3(&(3;G3$)2%789#
   @book = Book.find params[:id]        :4:23D33-(E03267,"'027F#73AHI<C??JKELM&"N"0O2
   @book.destroy                       PO;'QCLR<SBTUBV:W0IXY(Z*789#.4"<<2%/?=('/6:89.4:0E1(3689-230-%#
   redirect_to books_path              ."':29+#=-2.*+[E$$):[I+]^!["]
 end
end




                                                 47
delete
<tr id="book_<%= book.id %>">
 <td><%= h book.title %></td>
 <td><%= h book.author %></td>
 <td><%= book.price %></td>
 <td><%= book.published_on.to_s %></td>
 <td><%= link_to 'X', book_path(book), :method => :delete %></td>
</tr>                                 !"#$%&'(&)*+,"-#.#*#/$&012%34&-2"325'212%367.$-1789#
                                       .4:3;'24/(:<'";#*#7%$%279#3=(:4<"-2%3>$/24"<<2%/?=('/6.89#
                                       .4123=$/#*#7@ABC79#.4"&3($%#*#3=(:4=-2.9,"-#1#*#
                                       /$&012%34&-2"325'212%367(%<03789#14:23D33-(E032673;<27F#
                                       7=(//2%789#14:23D33-(E03267%"127F#7G123=$/789#14:23D33-(E032
                                       67,"'027F#7/2'232789#.4"<<2%/?=('/6189,"-#:#*#
class BooksController < ApplicationController
                                       /$&012%34&-2"325'212%367(%<03789#:4:23D33-(E032673;<27F#
 def destroy                           7=(//2%789#:4:23D33-(E03267%"127F#7"03=2%3(&(3;G3$)2%789#
   @book = Book.find params[:id]        :4:23D33-(E03267,"'027F#73AHI<C??JKELM&"N"0O2
   @book.destroy                       PO;'QCLR<SBTUBV:W0IXY(Z*789#.4"<<2%/?=('/6:89.4:0E1(3689-230-%#
   redirect_to books_path              ."':29+#=-2.*+[E$$):[I+]^!["]
 end
end




                                                 47
delete
<tr id="book_<%= book.id %>">
 <td><%= h book.title %></td>
 <td><%= h book.author %></td>
 <td><%= book.price %></td>
 <td><%= book.published_on.to_s %></td>
 <td><%= link_to 'X', book_path(book), :method => :delete %></td>
</tr>




class BooksController < ApplicationController
 def destroy
   @book = Book.find params[:id]
   @book.destroy
   redirect_to books_path
 end
end




                                                47
delete
<tr id="book_<%= book.id %>">
 <td><%= h book.title %></td>
 <td><%= h book.author %></td>
 <td><%= book.price %></td>
 <td><%= book.published_on.to_s %></td>
 <td><%= link_to 'X', book_path(book), :method => :delete %></td>
</tr>




class BooksController < ApplicationController
 def destroy
   @book = Book.find params[:id]
   @book.destroy
   redirect_to books_path
 end
end




                                                47
delete
<tr id="book_<%= book.id %>">
 <td><%= h book.title %></td>
 <td><%= h book.author %></td>
 <td><%= book.price %></td>
 <td><%= book.published_on.to_s %></td>
 <td><%= link_to 'X', book_path(book), :method => :delete %></td>
</tr>




class BooksController < ApplicationController
 def destroy
   @book = Book.find params[:id]
   @book.destroy
   redirect_to books_path
 end
end




                                                47
delete
<td>
 <%= link_to 'X', book_path(book), :class => "delete" %>
</td>




         $(document).ready(function() {
           $("a.delete").click(function(){
             $.ajax({
               type: "DELETE",
               url: this.href
             });
             $(this).parents("tr:first").remove();
             return false;
           });
         });

                                    48
Date Picker

$("#book_published_on").datepicker();




                     49
Ajax Pagination
class BooksController < ApplicationController
 def index
   @books = Book.all.paginate :per_page => 1,
                    :page => params[:page]
 end
end


<h2>Book List</h2>
<%= will_paginate @books %>
<table>
 <tbody id="books">
  <%= render :partial => 'book', :collection => @books %>
 </tbody>
</table>
<%= will_paginate @books %>


                                  50
Ajax Pagination

        <h2>Book List</h2>
        <div id="paginated_books">
        <%= render :partial => 'books' %>
        </div>




<%= will_paginate @books %>
<table>
 <tbody id="books">
  <%= render :partial => 'book', :collection => @books %>
 </tbody>
</table>
<%= will_paginate @books %>



                                 51
Ajax Pagination
index.js.erb
$("#paginated_books").html("<%= escape_javascript(render('books')) %>")




application.js
$(document).ready(function() {
  $(".pagination a").live("click", function() {                     .click(function() ...
    $(".pagination").html("loading....");                       .live(“click”, function() ...
    $.get(this.href, null, null, "script");
    return false;
  });
});



                                                  52
Thanks!



   53

More Related Content

What's hot

Command-Oriented Architecture
Command-Oriented ArchitectureCommand-Oriented Architecture
Command-Oriented ArchitectureLuiz Messias
 
CSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendCSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendFITC
 
HTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherHTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherIvano Malavolta
 
ApacheCon NA11 - Apache Celix, Universal OSGi?
ApacheCon NA11 - Apache Celix, Universal OSGi?ApacheCon NA11 - Apache Celix, Universal OSGi?
ApacheCon NA11 - Apache Celix, Universal OSGi?abroekhuis
 
Drupal csu-open atriumname
Drupal csu-open atriumnameDrupal csu-open atriumname
Drupal csu-open atriumnameEmanuele Quinto
 
Devs for Leokz e 7Masters - WTF Oriented Programming
Devs for Leokz e 7Masters - WTF Oriented ProgrammingDevs for Leokz e 7Masters - WTF Oriented Programming
Devs for Leokz e 7Masters - WTF Oriented ProgrammingFabio Akita
 
Modern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter BootstrapModern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter BootstrapHoward Lewis Ship
 
Interaction design
Interaction designInteraction design
Interaction designfeifei2011
 
Write Less Do More
Write Less Do MoreWrite Less Do More
Write Less Do MoreRemy Sharp
 
Desarrollo de módulos en Drupal e integración con dispositivos móviles
Desarrollo de módulos en Drupal e integración con dispositivos móvilesDesarrollo de módulos en Drupal e integración con dispositivos móviles
Desarrollo de módulos en Drupal e integración con dispositivos móvilesLuis Curo Salvatierra
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuerymanugoel2003
 

What's hot (19)

Command-Oriented Architecture
Command-Oriented ArchitectureCommand-Oriented Architecture
Command-Oriented Architecture
 
CSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the BackendCSS: A Slippery Slope to the Backend
CSS: A Slippery Slope to the Backend
 
HTML5 and CSS3 Refresher
HTML5 and CSS3 RefresherHTML5 and CSS3 Refresher
HTML5 and CSS3 Refresher
 
ApacheCon NA11 - Apache Celix, Universal OSGi?
ApacheCon NA11 - Apache Celix, Universal OSGi?ApacheCon NA11 - Apache Celix, Universal OSGi?
ApacheCon NA11 - Apache Celix, Universal OSGi?
 
Drupal csu-open atriumname
Drupal csu-open atriumnameDrupal csu-open atriumname
Drupal csu-open atriumname
 
Lenses
LensesLenses
Lenses
 
Fact, Fiction, and FP
Fact, Fiction, and FPFact, Fiction, and FP
Fact, Fiction, and FP
 
Sk.php
Sk.phpSk.php
Sk.php
 
SQLAlchemy Seminar
SQLAlchemy SeminarSQLAlchemy Seminar
SQLAlchemy Seminar
 
Dollar symbol
Dollar symbolDollar symbol
Dollar symbol
 
Devs for Leokz e 7Masters - WTF Oriented Programming
Devs for Leokz e 7Masters - WTF Oriented ProgrammingDevs for Leokz e 7Masters - WTF Oriented Programming
Devs for Leokz e 7Masters - WTF Oriented Programming
 
Modern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter BootstrapModern Application Foundations: Underscore and Twitter Bootstrap
Modern Application Foundations: Underscore and Twitter Bootstrap
 
Interaction design
Interaction designInteraction design
Interaction design
 
Coding website
Coding websiteCoding website
Coding website
 
Write Less Do More
Write Less Do MoreWrite Less Do More
Write Less Do More
 
Jquery 3
Jquery 3Jquery 3
Jquery 3
 
Desarrollo de módulos en Drupal e integración con dispositivos móviles
Desarrollo de módulos en Drupal e integración con dispositivos móvilesDesarrollo de módulos en Drupal e integración con dispositivos móviles
Desarrollo de módulos en Drupal e integración con dispositivos móviles
 
Django quickstart
Django quickstartDjango quickstart
Django quickstart
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 

Similar to JQuery In Rails

JavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring RooJavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring RooYasuharu Nakano
 
Advanced jQuery
Advanced jQueryAdvanced jQuery
Advanced jQuerysergioafp
 
jQuery Foot-Gun Features
jQuery Foot-Gun FeaturesjQuery Foot-Gun Features
jQuery Foot-Gun Featuresdmethvin
 
Cheap frontend tricks
Cheap frontend tricksCheap frontend tricks
Cheap frontend tricksambiescent
 
Dynamic Deployment With Apache Felix
Dynamic Deployment With Apache FelixDynamic Deployment With Apache Felix
Dynamic Deployment With Apache FelixMarcel Offermans
 
AngularJS: The Bridge Between Today and Tomorrow's Web (Todd Motto)
AngularJS: The Bridge Between Today and Tomorrow's Web (Todd Motto)AngularJS: The Bridge Between Today and Tomorrow's Web (Todd Motto)
AngularJS: The Bridge Between Today and Tomorrow's Web (Todd Motto)Future Insights
 
Using jQuery to Extend CSS
Using jQuery to Extend CSSUsing jQuery to Extend CSS
Using jQuery to Extend CSSChris Coyier
 
NETWORK REBRAND - pitch presentation (short version)
NETWORK REBRAND  - pitch presentation (short version)NETWORK REBRAND  - pitch presentation (short version)
NETWORK REBRAND - pitch presentation (short version)Stefano Di Ceglie
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the WorldJonathan Snook
 
DOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQueryDOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQueryRemy Sharp
 
Acceptance Testing with Webrat
Acceptance Testing with WebratAcceptance Testing with Webrat
Acceptance Testing with WebratLuismi Cavallé
 
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_ЯндексеТанки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_ЯндексеYandex
 

Similar to JQuery In Rails (20)

JavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring RooJavaOne2010 Groovy/Spring Roo
JavaOne2010 Groovy/Spring Roo
 
Advanced jQuery
Advanced jQueryAdvanced jQuery
Advanced jQuery
 
jQuery Foot-Gun Features
jQuery Foot-Gun FeaturesjQuery Foot-Gun Features
jQuery Foot-Gun Features
 
JQuery Flot
JQuery FlotJQuery Flot
JQuery Flot
 
Cheap frontend tricks
Cheap frontend tricksCheap frontend tricks
Cheap frontend tricks
 
InnoDB Magic
InnoDB MagicInnoDB Magic
InnoDB Magic
 
Dynamic Deployment With Apache Felix
Dynamic Deployment With Apache FelixDynamic Deployment With Apache Felix
Dynamic Deployment With Apache Felix
 
AngularJS: The Bridge Between Today and Tomorrow's Web (Todd Motto)
AngularJS: The Bridge Between Today and Tomorrow's Web (Todd Motto)AngularJS: The Bridge Between Today and Tomorrow's Web (Todd Motto)
AngularJS: The Bridge Between Today and Tomorrow's Web (Todd Motto)
 
jQuery
jQueryjQuery
jQuery
 
Jquery examples
Jquery examplesJquery examples
Jquery examples
 
Using jQuery to Extend CSS
Using jQuery to Extend CSSUsing jQuery to Extend CSS
Using jQuery to Extend CSS
 
NETWORK REBRAND - pitch presentation (short version)
NETWORK REBRAND  - pitch presentation (short version)NETWORK REBRAND  - pitch presentation (short version)
NETWORK REBRAND - pitch presentation (short version)
 
CSS3 Takes on the World
CSS3 Takes on the WorldCSS3 Takes on the World
CSS3 Takes on the World
 
DOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQueryDOM Scripting Toolkit - jQuery
DOM Scripting Toolkit - jQuery
 
R57.Php
R57.PhpR57.Php
R57.Php
 
Acceptance Testing with Webrat
Acceptance Testing with WebratAcceptance Testing with Webrat
Acceptance Testing with Webrat
 
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_ЯндексеТанки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
Танки_в_Лунапарке: нагрузочное_тестирование_в_Яндексе
 
Ipad gump
Ipad gumpIpad gump
Ipad gump
 
Couchdb
CouchdbCouchdb
Couchdb
 
Django at the Disco
Django at the DiscoDjango at the Disco
Django at the Disco
 

Recently uploaded

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 slidevu2urc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
[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.pdfhans926745
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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 productivityPrincipled Technologies
 
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...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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 WorkerThousandEyes
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 

Recently uploaded (20)

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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
[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
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
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...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

JQuery In Rails

Editor's Notes

  1. jQuery selectors are one of the most important aspects of the jQuery library. These selectors use familiar CSS syntax to allow page authors to quickly and easily identify any set of page elements to operate upon with the jQuery library methods. Understanding jQuery selectors is the key to using the jQuery library most effectively.
  2. Applying the methods is easy. Constructing the selector expressions is where the cleverness lies. The Basic Selectors are known as &amp;#x201C;find selectors&amp;#x201D; as they are used to find elements within the DOM. The Positional and Custom Selectors are &amp;#x201C;filter selectors&amp;#x201D; as they filter a set of elements (which defaults to the entire set of elements in the DOM).
  3. Used either separately, or in combination, the jQuery selectors give you a great deal of power to easily create a set of elements that you wish to operate upon with the jQuery methods.