I've got:
<th>First Name<span class="ui-icon ui-icon-arrowthick-1-s"></span></th>
When the user clicks on a th cell, I need to clear the span tag from every one of it's siblings.
$('th').click(function() {
var $th = $(this);
$th.siblings().each
I've got:
<th>First Name<span class="ui-icon ui-icon-arrowthick-1-s"></span></th>
When the user clicks on a th cell, I need to clear the span tag from every one of it's siblings.
$('th').click(function() {
var $th = $(this);
$th.siblings().each
Your question isn't very clear -- your title says remove the class, but your post says you need to clear the span tag? To remove the class you would use removeClass() in your each block. Otherwise to remove the entire tag you could use remove().
Edit You could try this:
$('th').click(function() {
var $th = $(this);
$th.siblings().each(function() {
$('span').remove();
}
}