This may be a basic question… but I am a newbie to jquery.
I need to remove the last column from a table row below
var ptr = $(this).closest("tr")
ptr.remove("td :last")
Is this the way to do it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to remove the last cell in each row (the whole column)
You can do the following
jsFiddle Demonstration
If you only want to remove the last cell in the first row do this
jsFiddle Demonstration
Anyway, i dont know how your table is structured (no source in your question).
You should use
theadandtbodyfor search engine optimization and good html.