fancybox & DataTables

fancybox & DataTables

gerennegerenne Posts: 30Questions: 0Answers: 0
edited March 2012 in General
I've been working with fancybox without problems, but now I've begun to work with dataTables, fancybox not work, is it incompatible?

Thanks in advance.

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    I don't see any reason why it would be incompatible - I've used it several times myself. Have you read this FAQ: http://datatables.net/faqs#events

    Allan
  • gerennegerenne Posts: 30Questions: 0Answers: 0
    The case is that I was using fancybox in my app, but since adding dataTables, the fancybox don't work.
  • gerennegerenne Posts: 30Questions: 0Answers: 0
    The case is that I was using fancybox in my app, but since adding dataTables, the fancybox don't work.
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Going to need a lot more to go on than that, if I'm going to have a chance of helping! Can you link me to the page please or put up a test case.

    Allan
  • gerennegerenne Posts: 30Questions: 0Answers: 0
    First , thanks for you help, I go to copy a example, in one page, I've this code that call to facnybox (before, this worked correctly):

    js:

    $(document).ready(function(){
    $("#new").fancybox({
    'hideOnContentClick': false,
    'transitionIn' : 'elastic',
    'transitionOut' : 'elastic',
    'speedIn' : 600,
    'speedOut' : 200,
    'overlayShow' : true,
    'href' : '',
    'autoDimensions': false,
    'width' : 400,
    'height' : 200

    });
    });

    line html:

    New customer

    This have to work indepen of Datatables, and before worked.

    The code of dateTables is:

    $('#customTable).dataTable( {
    "aaData": a1,
    "bFilter" : false,
    "aoColumns": [
    {"mDataProp": 0},
    {"mDataProp": 1},
    {"mDataProp": 2},
    {"mDataProp": 3},
    {"mDataProp": 4},
    {"mDataProp": 5},
    {"mDataProp": 6},
    {"mDataProp": 7}
    ]


    } );

    Thanks for all, Allan.
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    I presume that "new" is not inside the DataTable? In which case I don't see how DataTables would effect the fancy box init at all. Any errors shown in Firebug?

    Allan
  • gerennegerenne Posts: 30Questions: 0Answers: 0
    Nothing, the firebug don't show any error.
  • gbrokegbroke Posts: 7Questions: 0Answers: 0
    Fancybox works for me in my table, however once the entrie amount is changed, it stops working.
    Anyway, try this for yours:
    $('#customTable).dataTable( {
    "aaData": a1,"bFilter" : false,"aoColumns": [
    {"mDataProp": 0},
    {"mDataProp": 1},
    {"mDataProp": 2},
    {"mDataProp": 3},
    {"mDataProp": 4},
    {"mDataProp": 5},
    {"mDataProp": 6},
    {"mDataProp": 7}
    ]

    $("#new").fancybox()
    } );
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    I think that this FAQ is relevant here: http://datatables.net/faqs#events

    Allan
This discussion has been closed.