Just getting back into jQuery and JS and I am forgetting the basics..
J(".thSort").click(function() {
var num = J(this).parent().index() + 1;
var thName = J(this).parent().children().html();
J("table td:nth-child("+ num +"),th:nth-child("+ num +")").hide('slow');
J('.filterToggle').append(' <a href="#" onClick="J("table td:nth-child("+ num +"),th:nth-child("+ num +")").show();"> Show "thName" </a>');
});
Essentially this is hiding columns when I click an X with the class thSort. When it hides a column I want it to write to a div I have elsewhere what items have been hidden so people can “show” them again.
Pluckerpluck found your issue, but there is one more spot you used ” instead of ‘, which is why “thName” is being shown instead of the column name.
That should do the trick.