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
How to store a path in EditBox1.Text via DialogBox control?
High CPU utilization
Request.PhysicalApplicatio
nPath returns I.P. not URL
Outlook 2003 won't display calendar as sidebar
PHP.ini file 'display_errors' is set to Off but errors still appear on page?
How can I determine from an Office 2010 Volume License key (or product activation key) exactly which version of Office 2010 to download & install from MSDN (msdn.microsoft.com)?
How do I add a Folder to Windows Installer without having to add each individual file
Unattended Windows 7 Installation answer file not working
Wireless Projector Adapter
fruit vitamin content same in ca and fl?