Question
What is chaining in jquery?

Answers

Chaining is very powerful feature of jQuery.
Chaining means specifying multiple function and/or selectors to an element.
Examine the below example


$(document).ready(function(){
$('#mydiv').css('color', 'blue');
$('#mydiv').addClass('myclass');
$('#mydiv').fadeIn('fast');
}
By using chaining we can write above code as follows

$(document).ready(function(){
$('#mydiv').css('color','blue').addClass('myclass').fadeIn('fast'); });

Advantage of chaining is that it makes your code simple and simple to manage.
The execution becomes faster because the code search for the element only once.

    Your Comment




More Software Questions..
What is the inputsplit in map reduce software?

What is software configuration management?

What Is Java Api For Xml-based Rpc (jax-rpc)?

How can you implement fine-grained auditing?

What is IBM’s simple explanation for Big Data’s four critical features?

What is static synchronized method in JDBC API? Give an example?

What does the NULLIF function do?

What happens if a start method is not invoked and the run method is directly invoked?

Should we override finalize method

what is the difference between mysql_fetch_array and mysql_fetch_object?

How will XML affect my document links?

Why to use Style Sheets?

What are Filters in MVC?

Can you explain Application layer in OSI model?

How to define new testplan attributes?

What are the minimum system requirements to run Photoshop? Is it possible to run Photoshop over linux?

Which oracle package is used to manage the oracle lock management services?

What is Latch Up? Explain Latch Up with cross section of a CMOS Inverter. How do you avoid Latch Up?

What is marker interface?

What types of partitioning are there for BW?



Search
Can you Answer!!
  • Q What are Diagrams and Trigrams?
  • Q The character Lieutenant Pinkerton appears in what work
  • Q What is the output of following code : #include int main(void) {char i[3] = {'a','l', 'i'} for(int j = 0;j < 3 j++){printf('%c',i[j])} printf(' ) for(int j = 0; j< 3; j++){printf('%c',j[i]);}return 0; }
  • Q What are subsidiary books? why are they maintained?
  • Q David Cook became famous as who
  • Q Differentiate antiseptic from disinfectant.
  • Q What are the approaches to avoid hotspotting
  • Q In Life of Brian what name does Stan want to be known as now
  • Q Mento, a style of folk music similar to Calypso which has influnced ska and reggae, originated in which country?
  • Q How often do you work with physicians or social workers?
  • Q How many compaction types are in HBase?