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
PDFs and iPads
Exchange Active Sync and self assigned certificates
Batch script to calculate elapsed time in seconds : must be able to handle if time crosses midnight
How do I delete the default recipient policy in exchange 2010?
what port is currently being used
How can I detect a pixel color of an image in Flash using ActionScript 2?
cisco vpn setup error
Disable Shortcut Keys in axwindowsmediaplayer1 (media player)
Eclipse, Create Project from existing source
How to get an USB speaker to work with Eee PC 900 Xandros Linux