 |
Smarty
The discussions here are for Smarty, a template engine for the PHP programming language. Dedicated server web hosting provided by Guru-host.eu. |
| View previous topic :: View next topic |
| Author |
Message |
HugoRocha Smarty n00b
Joined: 08 May 2012 Posts: 2
|
Posted: Tue May 08, 2012 7:42 pm Post subject: [SOLVED] Problem with JQuery TableSorter |
|
|
Hi all,
I have a small code in a tpl file with a table and a small script with the JQuery TableSorter initiation.
If i run the file directly on the browser the tablesorter works (without the {literal} tags ofc). But when I use the $smarty->display("expts.tpl"); it doesn't work. I tried with {ldelim},{rdelim} still doesn't work, I even replaced $("#myTable") for jQuery("#myTable") it still doesn't work.
Both pages source code seen on the browser are exactly the same though.
I have been searching but all topics and tips i found didn't work, I would be very grateful if anyone could give me a hand.
| Code: |
<script type="text/javascript" src="jquery-latest.js"></script>
<script type="text/javascript" src="jquery.tablesorter.js"></script>
<body>
<table id="myTable" class="tablesorter" border="1">
<thead>
<tr>
<th>Last Name</th>
<th>First Name</th>
<th>Email</th>
<th>Due</th>
<th>Web Site</th>
</tr>
</thead>
<tbody>
<tr>
<td>Smith</td>
<td>John</td>
<td>jsmith@gmail.com</td>
<td>$50.00</td>
<td>http://www.jsmith.com</td>
</tr>
<tr>
<td>Bach</td>
<td>Frank</td>
<td>fbach@yahoo.com</td>
<td>$50.00</td>
<td>http://www.frank.com</td>
</tr>
<tr>
<td>Doe</td>
<td>Jason</td>
<td>jdoe@hotmail.com</td>
<td>$100.00</td>
<td>http://www.jdoe.com</td>
</tr>
<tr>
<td>Conway</td>
<td>Tim</td>
<td>tconway@earthlink.net</td>
<td>$50.00</td>
<td>http://www.timconway.com</td>
</tr>
</tbody>
</table>
</body>
<script type="text/javascript">
{literal}
jQuery(document).ready(function()
{
jQuery("#myTable").tablesorter();
}
);
{/literal}
</script>
|
Thanks in advance!
Last edited by HugoRocha on Tue May 08, 2012 8:57 pm; edited 1 time in total |
|
| Back to top |
|
HugoRocha Smarty n00b
Joined: 08 May 2012 Posts: 2
|
Posted: Tue May 08, 2012 8:57 pm Post subject: |
|
|
| Managed to found the error, thanks anyway! |
|
| Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|