Create a Javascript Code that removes a column of a table in wordpress
€30-250 EUR
Paiement à la livraison
I have a WordPress website that uses the WP Ninja Tables Pro Plugin to show tables. Every table has a header (left column) and one other column with content (see link example: [login to view URL]).
Now I inserted a snippet that shows Ads into one column which is called "Anzeige". However, the header of the column (green part) needs to disappear, so that the Ad content is bigger (especially on mobile).
The final result should look like the screenshots 1 and 2 that I added.
I already had a developer that created this code that I inserted before <body>:
<script>
function removeAnzeigeColumns(){
let all_ths = [login to view URL]('th');
let anzeige_ths = [];
[login to view URL]('Running function Anzeige ..')
for(let i = 0; i < [login to view URL]; i++){
try{
if(all_ths[i].textContent == 'Anzeige' || all_ths[i].textContent == 'Anzeige 1' || all_ths[i].textContent == 'Anzeige 2'){
[login to view URL](all_ths[i]);
}
} catch(err) {
}
}
for(let i = 0; i < [login to view URL]; i++){
let th_sibling = anzeige_ths[i].nextElementSibling;
try{
[login to view URL]('colspan', '2');
anzeige_ths[i].[login to view URL](anzeige_ths[i]);
} catch (e){
}
}
}
[login to view URL]('DOMContentLoaded', function(e){
setTimeout(function(){
removeAnzeigeColumns()
let table_links = [login to view URL]('.footable-page-link');
for(let i = 0; i < [login to view URL]; i++){
table_links[i].addEventListener('click', function(){
setTimeout(function(){removeAnzeigeColumns()},2000)
});
}
let selects = [login to view URL]('select');
for(let i = 0; i < [login to view URL]; i++){
selects[i].addEventListener('change', function(){
setTimeout(function(){removeAnzeigeColumns()},4000);
});
}
},3300);
});
</script>
However, with this code the column only disappears in the beginning when the page loads but when I use the filtering function on top or the pagination of the table, everything is messed up.
Unfortunately I cannot share access to the wordpress site so you need to solve the problem with "inspect element" and send me the code which I can then implement and you can test it.
Either you fix the code from the previous developer (see above) or you create a new one.
Nº du projet : #29965317
À propos du projet
16 freelances font une offre moyenne de 122 € pour ce travail
Hi, I am a Wordpress & JavaScript developer. I can create JavaScript code to remove the green part next to the ad.
Hi, I am full stack developer having 8+ yrs experience. I have reviewed description of your project. I can do this job, I can provide you code to add it on server. I can start work now. Thanks
Hi, Hope you are doing well! Thanks for sharing your project requirement with me. As a highly skilled Full-Stack developer, I can help you perfectly. I am very confident with my skills and I'd like to help your busines Plus
Hi, How are you? I am really interested in your project, " Create a Javascript Code that removes a column of a table in wordpress". I’m an experienced developer in Wordpress. I have rich experiences in PHP, JavaScri Plus
Hi, I'm a jQuery and WordPress expert and FULL Time Developer. I have checked your requirements carefully. I have rich experience in WordPress, PHP, Website design, CSS, Javascript, etc. I can start work immediate Plus
Hi, Hope you are doing well, I just read your description that you are looking for a WordPress Developer. I am a Full Stack Developer, meaning that i have already worked on different projects. Contact me for more info Plus