Mobile app version of vmapp.org
Login or Join
Tiffany637

: Cannot add DataTables.net javascript into Joomla 1.5 I've been having this problem where i couldn't add Datatables.net javascript into my Joomla article. I have been trying to include it through

@Tiffany637

Posted in: #Javascript #Joomla #Php

I've been having this problem where i couldn't add Datatables.net javascript into my Joomla article. I have been trying to include it through Jumi.

To say that my editor strips of the tag is somewhat not right as I have been able to execute Google Chart API in Joomla which also uses javascript.

Any clue why?

The code is as below :

<link href="//datatables.net/download/build/nightly/jquery.dataTables.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="//datatables.net/download/build/nightly/jquery.dataTables.js"></script>
<script type="text/javascript">
$(document).ready( function () {
var table = $('#example').DataTable();
} );
</script>

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Tiffany637

2 Comments

Sorted by latest first Latest Oldest Best

 

@Moriarity557

Unless you have disabled mootools (the default javascript library in Joomla 1.5), then the jquery may well be causing a conflict.

Instead of using $ try using jQuery, ie


jQuery(document).ready


The datatables javascript may also have the same problem.

10% popularity Vote Up Vote Down


 

@Dunderdale272

The HTML tag <link> is not allowed in the <body>. Edit the index.php of the template to include the <link> and remove it from the code to be included in the article.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme