DOM Layout

DOM Layout

coliniluvyoucoliniluvyou Posts: 4Questions: 2Answers: 0

Description of problem:

I wanted to know whether it is possible to move some of the table elements such as search filter outside the table ID DIV?

For example

Filter

    <div class="col-md-10">
        <table id="table_id" class="display">
            <thead>
                <tr>
                    <th>Hardware ID</th>
                    <th>DeviceType</th>
                </tr>
            </thead>
        </table>
    </div>  

As you can see the table is table_id and in my DOM settings would have:
"dom": '<"filter"f><"top">rt<"bottom"ilp><"clear">',

This hasn't worked but is there a practical way within DataTables?

I could probably do some CSS or JS magic but prefer not at this stage

Thanks

This question has an accepted answers - jump to answer

Answers

  • coliniluvyoucoliniluvyou Posts: 4Questions: 2Answers: 0
    <div class="col-md-2">
            <div class="filter">
                <p>Filter</p>               
            </div>
        </div>  
    
  • coliniluvyoucoliniluvyou Posts: 4Questions: 2Answers: 0

    Post missed out the above html

  • colincolin Posts: 15,143Questions: 1Answers: 2,586
    Answer ✓

    There's not, but you could use detach() to move outside, then appendTo() to reconnect,

    Colin

This discussion has been closed.