简体   繁体   中英

datatable tooltip not working

I'm getting "no tooltip function" error, below is my code, let me know if i'm missing something,

 $('#table_id_'+type+'_wrapper .dataTables_scrollBody tbody tr').each(function() {
                                            var sTitle;
                                            var nTds = $('td', this);
                                            var nTrs = $('tr', this);
                                            var sBrowser = $(nTds[14]).text();
                                            var sGrade = $(nTds[15]).text();

                                            if ( sGrade == "W" )
                                                sTitle =  sBrowser+' will provide a first class (A) level of CSS support.';
                                            else if ( sGrade == "D" )
                                                sTitle = sBrowser+' will provide a core (C) level of CSS support.';
                                            else
                                                sTitle = sBrowser+' will provide an undefined level of CSS support.';

                                            this.setAttribute( 'title', sTitle );
                                        });
                                        $(table.fnGetNodes()).tooltip( {
                                            "delay": 0,
                                            "track": true,
                                            "fade": 250
                                        });

Datatables version - 1.10.12

得到这个工作,我应该使用 on(draw.dt) 中的工具提示。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM