HTML table manipulation using jQuery?

I have created a plugin for jQuery that might help you, it's simple to use boriscy.github.com/grider.

I have created a plugin for jQuery that might help you, it's simple to use. boriscy.github.com/grider.

Thank you - the documentation you have is a little bit confusing, but I got it working, so thank you. PS, the links you have on the site don't work, I had to navigate myself to github. Com/boriscy/grider to find the download.

– Daniel Mar 18 '10 at 10:58.

This will work: $('#add'). Click(function() { var index = $('table tbody tr').last().index() + 1; var tr = $('table tbody tr').first().clone(); tr. Find('select') .

Attr('id', 'FulltimeCourseCampusCode' + index + 'CampusId') . Attr('name', 'dataFulltimeCourseCampusCode' + index + 'campus_id'); tr. Find('input') .

Attr('id', 'FulltimeCourseCampusCode0CourseCode') . Attr('name', 'dataFulltimeCourseCampusCode' + index + 'course_code'); $('table tbody'). Append(tr); return false; }).

Thank you for this, but I could not get it working, probably my own fault however, still need to learn a lot about jquery. – Daniel Mar 18 '10 at 10:58.

Write a function that returns the HTML (as a string or a DOM tree) but give it a parameter for the index.

This should work. If you execute the following every time the user clicks the add button. But no guarantee (untested written in 1min) var rows = $("table tbody tr"); var first rows.

Eq(0); first.clone(). AppendTo($("table tbody")). Find("*id^=FulltimeCourseCampusCode").

Each(function() { var $this = $(this); $this. Attr("id", $this. Attr("id").

Replace("0", rows.size())); $this. Attr("name", $this. Attr("name").

Replace("0", rows.size())); }).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions