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.
You can't chain a function that returns something other than a jQuery object. For example, attr() with one parameter to get the value of an attribute.
attr()