I'm trying to get my head around this method and I'm getting results
unexpected results. I'm trying to get the index number of the th's that
have the '.asc' class. Any ideas why the second one is returning -1 ?
Thank you! :)
html
head
script src=jquery.js type=text/javascript/script
It means that the 'th' you are looking at (which is only the first
'th' in each table) doesn't have a class of 'asc'.
http://docs.jquery.com/Core#index.28_subject_.29
It looks like you're trying to loop over each 'th' in each table try this:
$(document).ready(function() {