Css and js inclusion problem.

Css and js inclusion problem.

MarcoO96MarcoO96 Posts: 6Questions: 3Answers: 0

Hi to all,
I'am just using Datatables with this configuration:

css: <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.18/b-1.5.6/r-2.2.2/datatables.min.css"/>

JS:
SCRIT type="text/javascript" src="https://cdn.datatables.net/v/bs4/dt-1.10.18/b-1.5.6/r-2.2.2/datatables.min.js"> /SCRIPT
(I removed tags for this post, otherwise this script is included on this page :wink: )

Now I want to use the Search result Highlighting plugin (https://datatables.net/blog/2014-10-22) that has personal css and js files to load:

//cdn.datatables.net/plug-ins/1.10.19/features/searchHighlight/dataTables.searchHighlight.min.js
//cdn.datatables.net/plug-ins/1.10.19/features/searchHighlight/dataTables.searchHighlight.css
//bartaz.github.io/sandbox.js/jquery.highlight.js

When i load my files with theese files I have a conflict and the DataTables isn't rendered.
How can I properly includ theese other files avoiding conflicts ?

Thx Marco :smiley:

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,770
    Answer ✓

    When i load my files with theese files I have a conflict and the DataTables isn't rendered.

    Its hard to say without actually seeing the problem. Can you link to your page or a test case replicating the issue?
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    I would start by looking at the browser's console for errors. Do you find any?

    Kevin

  • MarcoO96MarcoO96 Posts: 6Questions: 3Answers: 0
    edited August 2019

    Thank you Kevin,
    I 've solved , there was an error in the inclusion of js/css files for the plugins.

    I copied "//bartaz.github.io/sandbox.js/jquery.highlight.js" from the official guide of the plugins at the link: https://datatables.net/blog/2014-10-22 without realizing that the link wasn't missing https at the beginnig :wink:

    I found the error on the js console :neutral:

This discussion has been closed.