Why my code not works ?I tried for Datatables examples but javascript not works
Why my code not works ?I tried for Datatables examples but javascript not works
jjgg
Posts: 4Questions: 2Answers: 0
<html>
<head>
<link rel="stylesheet" type="text/css" href="../lib/DataTables/media/css/jquery.dataTables.css">
</head>
<body>
Name | Position |
---|---|
Tiger Nixon | System Architect |
Garrett Winters | Accountant |
This discussion has been closed.
Answers
Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.
Information on how to create a test page, if you can't provide a link to your own page can be found here.
Thanks,
Allan
In js bin am getting proper output but while running it in single file sonething am missing am unable to found it.
I'd need a link to the page to be able to offer any help since I can't debug what I can't see :-)
BTW... It looks like your javascript is not inside a a script mark up. Wrap it:
<script >
$(document).ready(function() { $('#example').DataTable({ "order": [ [3, "desc"] ] }); });
</script>
@DirceuNazareth - That was the forum stripping tags because it hadn't been styling highlighted. I've changed the post now.
Allan
@jjgg By single file running you mean running from local?
If yes, your jquery might not work:
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.3.min.js"></script>
It is better make it a explicit the protocol
https
.<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>