Tuesday 6 August 2013

How Can You Select All Elements in a Page Using JQuery

$(’*”) – This command lets you select all the elements of a web page

What Happens if Element Accessed by a JQuery Selector Does Not Exist on Page

Don’t think that this would throw an error. If element does not exists, jQuery will do nothing

Name Some of the Methods of JQuery Used to Provide Effects

Some of the common methods are Show(). Hide(), Toggle(), FadeIn(), FadeOut()

How to Select Even or Odd Elements in Jquery

In order to select odd element using Jquery we can use odd Selector
example:-$(’tr:odd’) – This selects odd rows of table
In order to select even element using Jquery we can use even Selector
example:-$(’tr:even’) – This selects even rows of table

What is the Use of .serialize() in JQuery

The .serialize() method creates a text string in standard URL-encoded notation for form elements. $(’#form’).serialize() would have output something like
‘a=1&b=2&c=3&d=4&e=5′ where a,b,c,d,e are name of input elements of form & 1,2,3,4,5 are their correponding values