Can't gridify table

27 views
Skip to first unread message

Joe Borg

unread,
Jan 24, 2012, 6:01:34 AM1/24/12
to flex...@googlegroups.com
If there something wrong with this?

<script type='text/javascript' src='<?=$web_root?>assets/js/jquery/jquery.js'></script>
<script type='text/javascript' src='flexigrid/js/flexigrid.js'></script>
<link href="flexigrid/css/flexigrid.css" rel="stylesheet" type="text/css">

<table id="flex">
  <tr>
    <th>Fruits</th>
    <th>Colour</th>
  </tr>
  <tr>
    <td>Orange</td>
    <td>Orange</td>
  </tr>
  <tr>
    <td>Banana</td>
    <td>Yellow</td>
  </tr>
  <tr>
    <td>Apple</td>
    <td>Green</td>
  </tr>
  <tr>
    <td>Tomato</td>
    <td>Red</td>
  </tr>
</table>
<script>$('#flex').flexigrid({height:'auto',striped:false});</script>

Marcos

unread,
Feb 7, 2012, 2:01:15 PM2/7/12
to Flexigrid for jQuery
I tested this code and, excluding the paths (because I cann't check
them), the code is ok

Buy try these things:

1. Set the correct html headers

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">


2. Check always if the entire document is loaded before using jQuery

<script type="text/javascript" language="javascript">
$(document).ready(function() {
$("#flex").flexigrid({height: 'auto',striped: false});
});
</script>

If the error persists, paste your error here and we'll try to help

Marcos
Reply all
Reply to author
Forward
0 new messages