Create a Javascript Code that removes a column of a table in wordpress
€30-250 EUR
Igangværende
Slået op næsten 3 år siden
€30-250 EUR
Betales ved levering
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.
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 there.
I am an experienced expert in PHP/WordPRess
I am certainly confident I can perfectly meet your requirements.
If you hire me, you will be happy with excellent work, high quality, and a short period.
My budget is NEGOTIABLE.
Looking forward to hearing from you soon.
Sincerely regards
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 business by doing my best.
My clients have never been frustrated with my work and I hope to make you one of them.
Please confirm that I am one of the best fits for you and drop me a message for further discussion.
Thanks and Best Regards.
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, JavaScript, WordPress, CSS and HTML.
I’m ready to discuss your project and start immediately.
I can work full time also.
Looking forward to hearing you back and discussing all details.
If you have any questions, please let us know
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 immediately now and can provide you perfect result in a day
Please let's discuss your project and reasonable price for this project in more detail.
Thanks.
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 information
Thanks
Best regards
Ahmed Raza