html - Disabling sorting on nested DOM Element -


i'm working datatables , have th nested checkbox:

    <th class="sku-checkbox-wrapper sorting_desc" rowspan="1" colspan="1" aria-label="select all">select all<br>  <input type="checkbox" id="sku_select_all" class="checkbox"></th>  

currently, th has sorting event handler attached it. de-couple nested checkbox event.

i have th set 'bsortable':'true'. there way 'bsortable' :' false' nested checkbox , keep parent th element sortable?

you need add click event handler checkbox , prevent event propagation parent element.

$("#sku_select_all").on('click', function(e){    e.stoppropagation(); }); 

see this jsfiddle demonstration.


Comments

Popular posts from this blog

Java 3D LWJGL collision -

methods - python can't use function in submodule -

c# - ErrorThe type or namespace name 'AxWMPLib' could not be found (are you missing a using directive or an assembly reference?) -