$( document ).ready(function() { var pathname = window.location.pathname; if(pathname==="/front/computer.php"){ console.log( pathname ); $("table[id^=search_] thead tr").append('Remote support'); $("[id^=Computer_]").each(function(){ var id = $(this).attr('id').split("_").pop(); console.log(id); var html = {"1073":"<\/i> TeamViewer<\/a><\/span>","50":"<\/i> TeamViewer<\/a><\/span>","962":"<\/i> TeamViewer<\/a><\/span>","1045":"<\/i> TeamViewer<\/a><\/span>","1025":"<\/i> TeamViewer<\/a><\/span>","1046":"<\/i> TeamViewer<\/a><\/span>","120":"<\/i> TeamViewer<\/a><\/span>","1048":"<\/i> TeamViewer<\/a><\/span>","884":"<\/i> TeamViewer<\/a><\/span>","885":"<\/i> TeamViewer<\/a><\/span>","883":"<\/i> TeamViewer<\/a><\/span>
<\/i>
ISLOnline<\/a><\/span>
<\/i>
ISLOnline<\/a><\/span>","788":"<\/i> TeamViewer<\/a><\/span>","963":"<\/i> TeamViewer<\/a><\/span>","118":"<\/i> TeamViewer<\/a><\/span>","1157":"<\/i> TeamViewer<\/a><\/span>","1027":"<\/i> TeamViewer<\/a><\/span>","854":"<\/i> TeamViewer<\/a><\/span>","990":"<\/i> TeamViewer<\/a><\/span>","903":"<\/i> TeamViewer<\/a><\/span>
<\/i>
ISLOnline<\/a><\/span>
<\/i>
ISLOnline<\/a><\/span>","948":"<\/i> TeamViewer<\/a><\/span>","63":"<\/i> TeamViewer<\/a><\/span>","335":"<\/i> TeamViewer<\/a><\/span>","1189":"<\/i> TeamViewer<\/a><\/span>","1713":"<\/i> TeamViewer<\/a><\/span>","1854":"<\/i> TeamViewer<\/a><\/span>","1868":"<\/i> TeamViewer<\/a><\/span>","142":"<\/i> TeamViewer<\/a><\/span>","997":"<\/i> ISLOnline<\/a><\/span>","1559":"<\/i> ISLOnline<\/a><\/span>","1560":"<\/i> ISLOnline<\/a><\/span>"}; var td = ''; if(html.hasOwnProperty(id)){ $(this).parent().parent().append(td+html[id]+''); }else{ $(this).parent().parent().append(td+''); } }); } });