Monday 29 August 2011

Jquery - Image appender Plugin to tag



I was using a lot of jquery plug-ins say for Date component,for creating charts,for sorting tables and just thought of writing a very simple plug-in (jqueryImageAppender.js) to start with.

The compressed version of the jqueryImageAppender.js  is as below.This takes 3 params
1.id of the container(table)
2.Path of the image to be appended
3.Position to be placed (front of tr or end of tr)

so, this function appends the image to each tr at the specified position (at the begin or end)




appendImage('DATA_TABLE','list.gif','not_end') will result in the table as below.










Thanks for reading...cheers  ;-)

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. tested on chrome and fire fox ...seems there is some work around on i.e

    ReplyDelete