$(document).ready(function() { $.fn.dataTable.ext.order['sortMln'] = function ( settings, col ) { return this.api().column( col, {order:'index'} ).nodes().map( function ( td ) { return 1*$(td).text().replace(' Mio.', ''); } ); }; $.fn.dataTable.ext.order['sortCountryFlag'] = function ( settings, col ) { return this.api().column( col, {order:'index'} ).nodes().map( function ( td ) { return $('i', td).attr('title'); } ); }; $.fn.dataTable.ext.order['sortMostPopular'] = function ( settings, col ) { return this.api().column( col, {order:'index'} ).nodes().map( function ( td ) { return 1*$(td).text().substr(0,$(td).text().indexOf("x")-1); } ); }; }); var countries = {"214":{"id":"214","country":"England","countryCode":"EN","countryTr":"England"},"217":{"id":"217","country":"Northern Ireland","countryCode":"NIE","countryTr":"Nordirland"},"3":{"id":"3","country":"United States","countryCode":"US","countryTr":"Vereinigte Staaten"},"14":{"id":"14","country":"Germany","countryCode":"DE","countryTr":"Deutschland"},"51":{"id":"51","country":"Australia","countryCode":"AU","countryTr":"Australien"},"26":{"id":"26","country":"South Africa","countryCode":"ZA","countryTr":"S\u00fcdafrika"},"25":{"id":"25","country":"South Korea","countryCode":"KR","countryTr":"S\u00fcdkorea"},"88":{"id":"88","country":"Sweden","countryCode":"SE","countryTr":"Schweden"},"109":{"id":"109","country":"Denmark","countryCode":"DK","countryTr":"D\u00e4nemark"},"23":{"id":"23","country":"Italy","countryCode":"IT","countryTr":"Italien"},"215":{"id":"215","country":"Scotland","countryCode":"SF","countryTr":"Schottland"},"28":{"id":"28","country":"Spain","countryCode":"ES","countryTr":"Spanien"},"10":{"id":"10","country":"Japan","countryCode":"JP","countryTr":"Japan"},"158":{"id":"158","country":"Fiji","countryCode":"FJ","countryTr":"Fidschi"},"110":{"id":"110","country":"Slovakia","countryCode":"SK","countryTr":"Slowakei"},"76":{"id":"76","country":"Belgium","countryCode":"BE","countryTr":"Belgien"},"29":{"id":"29","country":"Colombia","countryCode":"CO","countryTr":"Kolumbien"},"118":{"id":"118","country":"Ireland","countryCode":"IE","countryTr":"Irland"},"216":{"id":"216","country":"Wales","countryCode":"WL","countryTr":"Wales"},"19":{"id":"19","country":"France","countryCode":"FR","countryTr":"Frankreich"},"61":{"id":"61","country":"Netherlands","countryCode":"NL","countryTr":"Die Niederlande"},"42":{"id":"42","country":"Venezuela","countryCode":"VE","countryTr":"Venezuela"},"31":{"id":"31","country":"Argentina","countryCode":"AR","countryTr":"Argentinien"},"69":{"id":"69","country":"Zimbabwe","countryCode":"ZW","countryTr":"Simbabwe"},"20":{"id":"20","country":"Thailand","countryCode":"TH","countryTr":"Thailand"},"7":{"id":"7","country":"Bangladesh","countryCode":"BD","countryTr":"Bangladesch"},"124":{"id":"124","country":"New Zealand","countryCode":"NZ","countryTr":"Neuseeland"},"2":{"id":"2","country":"India","countryCode":"IN","countryTr":"Indien"},"93":{"id":"93","country":"Austria","countryCode":"AT","countryTr":"\u00d6sterreich"},"60":{"id":"60","country":"Chile","countryCode":"CL","countryTr":"Chile"},"1":{"id":"1","country":"China","countryCode":"CN","countryTr":"China"},"36":{"id":"36","country":"Canada","countryCode":"CA","countryTr":"Kanada"},"116":{"id":"116","country":"Singapore","countryCode":"SG","countryTr":"Singapur"},"77":{"id":"77","country":"Portugal","countryCode":"PT","countryTr":"Portugal"},"104":{"id":"104","country":"Paraguay","countryCode":"PY","countryTr":"Paraguay"},"49":{"id":"49","country":"Taiwan","countryCode":"TW","countryTr":"Taiwan"},"112":{"id":"112","country":"Finland","countryCode":"FI","countryTr":"Finnland"},"5":{"id":"5","country":"Brasil","countryCode":"BR","countryTr":"Brasilien"},"12":{"id":"12","country":"Philippines","countryCode":"PH","countryTr":"Philippinen"},"11":{"id":"11","country":"Mexico","countryCode":"MX","countryTr":"Mexiko"},"117":{"id":"117","country":"Norway","countryCode":"NO","countryTr":"Norwegen"},"43":{"id":"43","country":"Malaysia","countryCode":"MY","countryTr":"Malaysia"},"119":{"id":"119","country":"Costa Rica","countryCode":"CR","countryTr":"Costa Rica"},"126":{"id":"126","country":"Puerto Rico","countryCode":"PR","countryTr":"Puerto Rico"},"122":{"id":"122","country":"United Arab Emirates","countryCode":"AE","countryTr":"Vereinigte Arabische Emirate"},"175":{"id":"175","country":"Iceland","countryCode":"IS","countryTr":"Island"},"17":{"id":"17","country":"Turkey","countryCode":"TR","countryTr":"T\u00fcrkei"},"94":{"id":"94","country":"Swiss","countryCode":"CH","countryTr":"Schweiz"},"33":{"id":"33","country":"Poland","countryCode":"PL","countryTr":"Polen"},"37":{"id":"37","country":"Morocco","countryCode":"MA","countryTr":"Marokko"},"105":{"id":"105","country":"Jordan","countryCode":"JO","countryTr":"Jordanien"},"46":{"id":"46","country":"Saudi Arabia","countryCode":"SA","countryTr":"Saudi-Arabien"},"40":{"id":"40","country":"Peru","countryCode":"PE","countryTr":"Peru"},"78":{"id":"78","country":"Czech Republic","countryCode":"CZ","countryTr":"Tschechien"},"203":{"id":"203","country":"Bermuda","countryCode":"BM","countryTr":"Bermuda-Inseln"},"220":{"id":"220","country":"Cayman Islands","countryCode":"KY","countryTr":"Cayman Islands"},"68":{"id":"68","country":"Guatemala","countryCode":"GT","countryTr":"Guatemala"},"98":{"id":"98","country":"Hong Kong","countryCode":"HK","countryTr":"Hongkong"},"66":{"id":"66","country":"Ecuador","countryCode":"EC","countryTr":"Ecuador"}}; var teams = [{"id":0,"name":""}]; var sportsmen = [{"id":"4413","tem":"0","ctr":"217","nam":"McIlroy, Rory ","namorig":"McIlroy, Rory ","cat":"","pri":"21,8 Mio.","rat":0,"mw":"M","link":"McIlroy, Rory <\/a>","confirmed_b":1},{"id":"4442","tem":"0","ctr":"23","nam":"Molinari, Francesco ","namorig":"Molinari, Francesco ","cat":"","pri":"18,6 Mio.","rat":0,"mw":"M","link":"Molinari, Francesco <\/a>","confirmed_b":1},{"id":"4561","tem":"0","ctr":"214","nam":"Fleetwood, Tommy ","namorig":"Fleetwood, Tommy ","cat":"","pri":"18,3 Mio.","rat":0,"mw":"M","link":"Fleetwood, Tommy <\/a>","confirmed_b":1},{"id":"15875","tem":"0","ctr":"28","nam":"Rahm, Jon ","namorig":"Rahm, Jon ","cat":"","pri":"15,8 Mio.","rat":0,"mw":"M","link":"Rahm, Jon <\/a>","confirmed_b":1},{"id":"7537","tem":"0","ctr":"214","nam":"Hatton, Tyrrell ","namorig":"Hatton, Tyrrell ","cat":"","pri":"14,1 Mio.","rat":0,"mw":"M","link":"Hatton, Tyrrell <\/a>","confirmed_b":1},{"id":"4457","tem":"0","ctr":"28","nam":"Garcia, Sergio ","namorig":"Garcia, Sergio ","cat":"","pri":"13,7 Mio.","rat":0,"mw":"M","link":"Garcia, Sergio <\/a>","confirmed_b":1},{"id":"17703","tem":"0","ctr":"3","nam":"Schauffele, Xander ","namorig":"Schauffele, Xander ","cat":"","pri":"13,5 Mio.","rat":0,"mw":"M","link":"Schauffele, Xander <\/a>","confirmed_b":1},{"id":"7509","tem":"0","ctr":"3","nam":"Reed, Patrick ","namorig":"Reed, Patrick ","cat":"","pri":"12,6 Mio.","rat":0,"mw":"M","link":"Reed, Patrick <\/a>","confirmed_b":1},{"id":"4546","tem":"0","ctr":"109","nam":"Olesen, Thorbj\u00f8rn ","namorig":"Olesen, Thorbj\u00f8rn ","cat":"","pri":"11,9 Mio.","rat":0,"mw":"M","link":"Olesen, Thorbj\u00f8rn <\/a>","confirmed_b":1},{"id":"8451","tem":"0","ctr":"1","nam":"Li, Haotong ","namorig":"Li, Haotong ","cat":"","pri":"11,3 Mio.","rat":0,"mw":"M","link":"Li, Haotong <\/a>","confirmed_b":1},{"id":"4575","tem":"0","ctr":"20","nam":"Aphibarnrat, Kiradech ","namorig":"Aphibarnrat, Kiradech ","cat":"","pri":"10,6 Mio.","rat":0,"mw":"M","link":"Aphibarnrat, Kiradech <\/a>","confirmed_b":1},{"id":"7416","tem":"0","ctr":"214","nam":"Pepperell, Eddie ","namorig":"Pepperell, Eddie ","cat":"","pri":"10,5 Mio.","rat":0,"mw":"M","link":"Pepperell, Eddie <\/a>","confirmed_b":1},{"id":"4482","tem":"0","ctr":"88","nam":"Noren, Alex ","namorig":"Noren, Alex ","cat":"","pri":"10,2 Mio.","rat":0,"mw":"M","link":"Noren, Alex <\/a>","confirmed_b":1},{"id":"10481","tem":"0","ctr":"109","nam":"Bjerregaard, Lucas ","namorig":"Bjerregaard, Lucas ","cat":"","pri":"10 Mio.","rat":0,"mw":"M","link":"Bjerregaard, Lucas <\/a>","confirmed_b":1},{"id":"10425","tem":"0","ctr":"76","nam":"Pieters, Thomas ","namorig":"Pieters, Thomas ","cat":"","pri":"9,8 Mio.","rat":0,"mw":"M","link":"Pieters, Thomas <\/a>","confirmed_b":1},{"id":"4433","tem":"0","ctr":"214","nam":"Poulter, Ian ","namorig":"Poulter, Ian ","cat":"","pri":"9,3 Mio.","rat":0,"mw":"M","link":"Poulter, Ian <\/a>","confirmed_b":1},{"id":"4579","tem":"0","ctr":"28","nam":"Cabrera Bello, Rafa ","namorig":"Cabrera Bello, Rafa ","cat":"","pri":"8,7 Mio.","rat":0,"mw":"M","link":"Cabrera Bello, Rafa <\/a>","confirmed_b":1},{"id":"7534","tem":"0","ctr":"214","nam":"Fitzpatrick, Matt ","namorig":"Fitzpatrick, Matt ","cat":"","pri":"8,6 Mio.","rat":0,"mw":"M","link":"Fitzpatrick, Matt <\/a>","confirmed_b":1},{"id":"17665","tem":"0","ctr":"88","nam":"Bj\u00f6rk, Alexander ","namorig":"Bj\u00f6rk, Alexander ","cat":"","pri":"8,2 Mio.","rat":0,"mw":"M","link":"Bj\u00f6rk, Alexander <\/a>","confirmed_b":1},{"id":"4670","tem":"0","ctr":"26","nam":"Grace, Branden ","namorig":"Grace, Branden ","cat":"","pri":"7,9 Mio.","rat":0,"mw":"M","link":"Grace, Branden <\/a>","confirmed_b":1},{"id":"4572","tem":"0","ctr":"88","nam":"Stenson, Henrik ","namorig":"Stenson, Henrik ","cat":"","pri":"7,8 Mio.","rat":0,"mw":"M","link":"Stenson, Henrik <\/a>","confirmed_b":1},{"id":"4685","tem":"0","ctr":"215","nam":"Knox, Russell ","namorig":"Knox, Russell ","cat":"","pri":"7,7 Mio.","rat":0,"mw":"M","link":"Knox, Russell <\/a>","confirmed_b":1},{"id":"4618","tem":"0","ctr":"118","nam":"Lowry, Shane ","namorig":"Lowry, Shane ","cat":"","pri":"7,3 Mio.","rat":0,"mw":"M","link":"Lowry, Shane <\/a>","confirmed_b":1},{"id":"10430","tem":"0","ctr":"28","nam":"Otaegui, Adrian ","namorig":"Otaegui, Adrian ","cat":"","pri":"7,1 Mio.","rat":0,"mw":"M","link":"Otaegui, Adrian <\/a>","confirmed_b":1},{"id":"11064","tem":"0","ctr":"124","nam":"Fox, Ryan ","namorig":"Fox, Ryan ","cat":"","pri":"7 Mio.","rat":0,"mw":"M","link":"Fox, Ryan <\/a>","confirmed_b":1},{"id":"4489","tem":"0","ctr":"214","nam":"Fisher, Ross ","namorig":"Fisher, Ross ","cat":"","pri":"6,8 Mio.","rat":0,"mw":"M","link":"Fisher, Ross <\/a>","confirmed_b":1},{"id":"11915","tem":"0","ctr":"26","nam":"Frittelli, Dylan ","namorig":"Frittelli, Dylan ","cat":"","pri":"6,3 Mio.","rat":0,"mw":"M","link":"Frittelli, Dylan <\/a>","confirmed_b":1},{"id":"4416","tem":"0","ctr":"14","nam":"Kaymer, Martin ","namorig":"Kaymer, Martin ","cat":"","pri":"6,2 Mio.","rat":0,"mw":"M","link":"Kaymer, Martin <\/a>","confirmed_b":1},{"id":"7501","tem":"0","ctr":"19","nam":"Levy, Alexander ","namorig":"Levy, Alexander ","cat":"","pri":"5,8 Mio.","rat":0,"mw":"M","link":"Levy, Alexander <\/a>","confirmed_b":1},{"id":"17686","tem":"0","ctr":"214","nam":"Wallace, Matt ","namorig":"Wallace, Matt ","cat":"","pri":"5,7 Mio.","rat":0,"mw":"M","link":"Wallace, Matt <\/a>","confirmed_b":1},{"id":"7503","tem":"0","ctr":"26","nam":"Stone, Brandon ","namorig":"Stone, Brandon ","cat":"","pri":"5,6 Mio.","rat":0,"mw":"M","link":"Stone, Brandon <\/a>","confirmed_b":1},{"id":"4506","tem":"0","ctr":"61","nam":"Luiten, Joost ","namorig":"Luiten, Joost ","cat":"","pri":"5,5 Mio.","rat":0,"mw":"M","link":"Luiten, Joost <\/a>","confirmed_b":1},{"id":"7254","tem":"0","ctr":"214","nam":"Sullivan, Andy ","namorig":"Sullivan, Andy ","cat":"","pri":"5,3 Mio.","rat":0,"mw":"M","link":"Sullivan, Andy <\/a>","confirmed_b":1},{"id":"10697","tem":"0","ctr":"118","nam":"Dunne, Paul ","namorig":"Dunne, Paul ","cat":"","pri":"5,2 Mio.","rat":0,"mw":"M","link":"Dunne, Paul <\/a>","confirmed_b":1},{"id":"4412","tem":"0","ctr":"214","nam":"Westwood, Lee ","namorig":"Westwood, Lee ","cat":"","pri":"5,1 Mio.","rat":0,"mw":"M","link":"Westwood, Lee <\/a>","confirmed_b":1},{"id":"4578","tem":"0","ctr":"214","nam":"Wood, Chris ","namorig":"Wood, Chris ","cat":"","pri":"5 Mio.","rat":0,"mw":"M","link":"Wood, Chris <\/a>","confirmed_b":1},{"id":"17644","tem":"0","ctr":"214","nam":"Smith, Jordan ","namorig":"Smith, Jordan ","cat":"","pri":"4,9 Mio.","rat":0,"mw":"M","link":"Smith, Jordan <\/a>","confirmed_b":1},{"id":"4558","tem":"0","ctr":"214","nam":"Willett, Danny ","namorig":"Willett, Danny ","cat":"","pri":"4,6 Mio.","rat":0,"mw":"M","link":"Willett, Danny <\/a>","confirmed_b":1},{"id":"7515","tem":"0","ctr":"28","nam":"Campillo, Jorge ","namorig":"Campillo, Jorge ","cat":"","pri":"4,5 Mio.","rat":0,"mw":"M","link":"Campillo, Jorge <\/a>","confirmed_b":1},{"id":"12387","tem":"0","ctr":"19","nam":"Lorenzo-Vera, Mike ","namorig":"Lorenzo-Vera, Mike ","cat":"","pri":"4,4 Mio.","rat":0,"mw":"M","link":"Lorenzo-Vera, Mike <\/a>","confirmed_b":1},{"id":"4783","tem":"0","ctr":"214","nam":"Lewis, Tom ","namorig":"Lewis, Tom ","cat":"","pri":"4,3 Mio.","rat":0,"mw":"M","link":"Lewis, Tom <\/a>","confirmed_b":1},{"id":"17679","tem":"0","ctr":"76","nam":"Detry, Thomas ","namorig":"Detry, Thomas ","cat":"","pri":"4,1 Mio.","rat":0,"mw":"M","link":"Detry, Thomas <\/a>","confirmed_b":1},{"id":"7240","tem":"0","ctr":"26","nam":"Fichardt, Darren ","namorig":"Fichardt, Darren ","cat":"","pri":"4,1 Mio.","rat":0,"mw":"M","link":"Fichardt, Darren <\/a>","confirmed_b":1},{"id":"11066","tem":"0","ctr":"112","nam":"Korhonen, Mikko ","namorig":"Korhonen, Mikko ","cat":"","pri":"4 Mio.","rat":0,"mw":"M","link":"Korhonen, Mikko <\/a>","confirmed_b":1},{"id":"10341","tem":"0","ctr":"23","nam":"Pavan, Andrea ","namorig":"Pavan, Andrea ","cat":"","pri":"3,9 Mio.","rat":0,"mw":"M","link":"Pavan, Andrea <\/a>","confirmed_b":1},{"id":"18144","tem":"0","ctr":"214","nam":"Rai, Aaron ","namorig":"Rai, Aaron ","cat":"","pri":"3,9 Mio.","rat":0,"mw":"M","link":"Rai, Aaron <\/a>","confirmed_b":1},{"id":"19779","tem":"0","ctr":"51","nam":"Herbert, Lucas ","namorig":"Herbert, Lucas ","cat":"","pri":"3,8 Mio.","rat":0,"mw":"M","link":"Herbert, Lucas <\/a>","confirmed_b":1},{"id":"19755","tem":"0","ctr":"26","nam":"Rooyen, Erik van","namorig":"Rooyen, Erik van","cat":"","pri":"3,7 Mio.","rat":0,"mw":"M","link":"Rooyen, Erik van<\/a>","confirmed_b":1},{"id":"17943","tem":"0","ctr":"2","nam":"Sharma, Shubhankar ","namorig":"Sharma, Shubhankar ","cat":"","pri":"3,6 Mio.","rat":0,"mw":"M","link":"Sharma, Shubhankar <\/a>","confirmed_b":1},{"id":"15354","tem":"0","ctr":"26","nam":"Burmester, Dean ","namorig":"Burmester, Dean ","cat":"","pri":"3,5 Mio.","rat":0,"mw":"M","link":"Burmester, Dean <\/a>","confirmed_b":1},{"id":"13420","tem":"0","ctr":"88","nam":"Kinhult, Marcus ","namorig":"Kinhult, Marcus ","cat":"","pri":"3,5 Mio.","rat":0,"mw":"M","link":"Kinhult, Marcus <\/a>","confirmed_b":1},{"id":"8046","tem":"0","ctr":"214","nam":"Paisley, Chris ","namorig":"Paisley, Chris ","cat":"","pri":"3,3 Mio.","rat":0,"mw":"M","link":"Paisley, Chris <\/a>","confirmed_b":1},{"id":"12437","tem":"0","ctr":"214","nam":"Horsfield, Sam ","namorig":"Horsfield, Sam ","cat":"","pri":"3,2 Mio.","rat":0,"mw":"M","link":"Horsfield, Sam <\/a>","confirmed_b":1},{"id":"4835","tem":"0","ctr":"1","nam":"Wu, Ashun ","namorig":"Wu, Ashun ","cat":"","pri":"3,1 Mio.","rat":0,"mw":"M","link":"Wu, Ashun <\/a>","confirmed_b":1},{"id":"7361","tem":"0","ctr":"51","nam":"Ormsby, Wade ","namorig":"Ormsby, Wade ","cat":"","pri":"3 Mio.","rat":0,"mw":"M","link":"Ormsby, Wade <\/a>","confirmed_b":1},{"id":"10705","tem":"0","ctr":"214","nam":"Southgate, Matthew ","namorig":"Southgate, Matthew ","cat":"","pri":"2,9 Mio.","rat":0,"mw":"M","link":"Southgate, Matthew <\/a>","confirmed_b":1},{"id":"4719","tem":"0","ctr":"214","nam":"Slattery, Lee ","namorig":"Slattery, Lee ","cat":"","pri":"2,8 Mio.","rat":0,"mw":"M","link":"Slattery, Lee <\/a>","confirmed_b":1},{"id":"4530","tem":"0","ctr":"214","nam":"Rock, Robert ","namorig":"Rock, Robert ","cat":"","pri":"2,7 Mio.","rat":0,"mw":"M","link":"Rock, Robert <\/a>","confirmed_b":1},{"id":"8587","tem":"0","ctr":"10","nam":"Tanihara, Hideto ","namorig":"Tanihara, Hideto ","cat":"","pri":"2,7 Mio.","rat":0,"mw":"M","link":"Tanihara, Hideto <\/a>","confirmed_b":1},{"id":"13815","tem":"0","ctr":"88","nam":"Lagergren, Joakim ","namorig":"Lagergren, Joakim ","cat":"","pri":"2,6 Mio.","rat":0,"mw":"M","link":"Lagergren, Joakim <\/a>","confirmed_b":1}]; var sportsmenTeams = []; var showTeams = 0; //*********************** //SPORTSMEN TABLE HEADERS //*********************** var headersTableSportsmen = [ { 'sTitle': 'Nr.' }, { 'sTitle': 'Gruppe' , 'bSearchable': false, 'bVisible': false }, { 'sTitle': 'Land', 'sSortDataType': 'sortCountryFlag', sType : "text" }, { 'sTitle': 'Golfspieler'}, { 'sTitle': 'Wert', 'sSortDataType': 'sortMln', 'sType': 'numeric' }, { 'sTitle': 'Team' , 'bSearchable': false, 'bVisible': false }, { 'sTitle': 'M/F' , 'bSearchable': false, 'bVisible': false } ]; //*********************** //TEAMS TABLE HEADERS //*********************** var headersTableTeams = [ {'sTitle': 'Nr.'}, {'sTitle': '' , 'bSearchable': false, 'bVisible': false }, {'sTitle': 'Land' , 'sSortDataType': 'sortCountryFlag', sType : 'text' }, { 'sTitle': ''}, { 'sTitle': 'Wert', 'sSortDataType': 'sortMln', 'sType': 'numeric' } ]; //*********************** //SPORTSMEN TABLE CONTENT //*********************** var contentTableSportsmen = []; $.each(sportsmen, function(k, v) { contentTableSportsmen.push([ k + 1, v['cat'], getFlag(v['ctr']), v['link'], v['pri'], isset(teams[v['tem']])? teams[v['tem']]['name']:'', v['mw'] ]); }); //*********************** //TEAMS TABLE CONTENT //*********************** var contentTableTeams = []; $.each(sportsmenTeams, function(k, v) { contentTableTeams.push([ k + 1, "", getFlag(v['ctr']), v['nam'], v['pri'] ]); }); function isset (va) { return typeof va != 'undefined'; } $(document).ready(function() { $.fn.dataTable.ext.order['sortMln'] = function (settings, col) { return this.api().column(col, {order: 'index'}).nodes().map(function (td) { return parseFloat($(td).text().replace(' Mio.', '').replace(',', '.')); } ); }; if (sportsmen.length) { var sportsmenTable = $('#tblSportsmen').dataTable( { "bPaginate": false, "bFilter": true, "bInfo": false, "bAutoWidth": true, "aoColumns" : headersTableSportsmen, "aaData": contentTableSportsmen, "bAutoWidth": false } ); } if (sportsmenTeams.length) { var sportsmenTeamsTable = $('#tblTeams').dataTable( { "bPaginate": false, "bFilter": true, "bInfo": false, "bAutoWidth": true, "aoColumns" : headersTableTeams, "aaData": contentTableTeams, "bAutoWidth": false } ); $('#teamsOverview').show(); } } ); function getFlag(id, margin) { if (!id || typeof countries[id] === "undefined" ) return ""; if (typeof margin == 'undefined') margin = true; return ""; }