Link to home
Start Free TrialLog in
Avatar of doctor069
doctor069Flag for Canada

asked on

Jquery JTemplates - Repeat Columns

Hi -

I Am using JTemplates to create a table using ajax

<table border="1">
  <tbody>
    {#foreach $T as data}
    <tr>
      <td><img alt="" src='/libraries/users/{$T.data.UserId}/{$T.data.IntroImage}' width="150px" height="150px" /></td>
    </tr>
    {#/for}
  </tbody>
</table>

Is it possible to have the image repeat in 4 columns and then go to the next row?

ie (static)

<table border="1">
  <tbody>
    <tr>
      <td><img alt="" src='/libraries/users/UserId/1.jpg' width="150px" height="150px" /></td>
      <td><img alt="" src='/libraries/users/UserId/2.jpg' width="150px" height="150px" /></td>
      <td><img alt="" src='/libraries/users/UserId/3.jpg' width="150px" height="150px" /></td>
      <td><img alt="" src='/libraries/users/UserId/4.jpg' width="150px" height="150px" /></td>
    </tr>
      <tr>
      <td><img alt="" src='/libraries/users/UserId/5.jpg' width="150px" height="150px" /></td>
      <td><img alt="" src='/libraries/users/UserId/6.jpg' width="150px" height="150px" /></td>
      <td><img alt="" src='/libraries/users/UserId/7.jpg' width="150px" height="150px" /></td>
      <td><img alt="" src='/libraries/users/UserId/8.jpg' width="150px" height="150px" /></td>
    </tr>
  </tbody>
</table>

ASKER CERTIFIED SOLUTION
Avatar of omare8
omare8

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of StealthyDev
StealthyDev

Resolved?
Avatar of doctor069

ASKER

That did the trick! Thanks very much