MyBB Community Forums

Full Version: Integrate jQuery 'DataTables' pluing in posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I wonder if it's possible to integrate tables based on the jQuery DataTables plugin in my posts (I use HTML in Posts mod).

I tried, but no style appears in my post... I followed several basic examples, including this last one :

- Added to headerinclude template :

<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.9/css/jquery.dataTables.min.css" />
<script type="text/javascript" charset="utf8" src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js"></script>

<script type="text/javascript">
$(document).ready(function() {
    $('#example').DataTable( {
        "order": [[ 3, "desc" ]]
    } );
} );
</script>

- In post :

<table id="example" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>Name</th>
etc...



Conflict issue with MyBB's jQuery integration?


Thanks for your help! Rolleyes
Please include a link to your forum so that we can debug this.
Thank you for response.

I posted my table on the public site, and it works! I do not understand. The local and online website are the same!

It's works. But when I click on edit button, I can't choose between Full Edit and Quick Edit Sad

Problem solved : use the default version of jQuery (integrated with MyBB), don't use another version.