I know that not all jQuery functions can be chained together. Is there a rule of thumb on this. When can we not chain 2 functions together.
The way to distinguish is that functions which have side effects typically return jquery and can be chained where as functions with an actual return (like .text()) cannot.
.text()