Microsoft
Software
Hardware
Network
Question : jquery selector basic question
Hi, I know that jquery selector accepts CSS syntax etc. I am puzzled however by this
example for going through each column:
Why in $('th', $table) we need a comma and then $table object ?
Would not be enough just to put $('table th') ?
or just $('th') ?
$(document).ready(function
() {
$('table.sortable').each(f
unction() {
var $table = $(this);
$('th', $table).each(function(colu
mn) {
var $header = $(this);
if ($header.is('.sort-alpha')
) {
$header.addClass('clickabl
e').hover(
function()
{
$header.addClass('hover');
}, function() { ...
$header.removeClass('hover
');
Answer : jquery selector basic question
FYI: when you do this:
$('th')
internally, jquery actually "executes":
$('th', document);
that's why you would get all the th in the document.
Reference:
http://docs.jquery.com/%24
Random Solutions
Ampersand in Web.Config appSettings
Can't open to a specified PDF page in IE 8
Fading in/out a popup Window in Flex 4.0
Returning 0 from a template member function when instantiated with aggregate types
How to update & append at the same time from another table a table in SQL Server
Lotus Agent to save attachment
Mac RDP clients slow?
Best Software Environment to create Image / Designs / Templates for Websites
how to read /var/adm/wtmp file of HP-UX
In a database, using a ColdFusion application, I need to assign documents to document topics.