Remove element if next contains value Posted by easylife Posted in: Atlassian. Tagged: confluence, jquery. Leave a Comment When creating reports in Confluence sometimes you have to remove a line if the next one contains certain value. For example, if you have a report in Confluence with a list like this: Line 1 No blog posts found. Line 2 Blog post 2 Line 3 Blog post 3 if you want to remove the first like, since it has no blog post found for it, save the following code as a user macro through Confluence admin panel: ## @noparams <script> AJS.toInit(function() { $(".blog-post-list:contains('No blog posts found.')").parent('li').addClass("hidden"); }); </script> Then added to the page from Macro selection menu. Loading… EmailFacebookTwitterDiggRedditGoogle +1 Posts navigation ← Sony HMZ-T1 vs. HMZ-T2 Relief dry eye →