[jQuery] When to Use'.' When Referring To Css Classes In JQuery
Hi,
Is there some general rule to determine when '.' should be added to
JQuery method parameters when referring to CSS classes. Here's an
example from the excellent book "Learning JQuery 1.3"
if ($header.is('.sort-alpha')) {
findSortKey = function($cell) {
return $cell.find('sort-key')
.text().toUpperCase() + ' ' + $cell.text
().toUpperCase();
};
}
In this case both '.sort-alpha' and 'sort-key' are CSS classes. How
does one know when to include the '.'
Thanks,
Mark
PS. I accidentally placed this in the JQuery Plugin Discussions.
Apologies for the duplication.