On a page if two elements have a similar content, how do I use jQuery to hide one?

On this page:
http://temp.novelbread.com/informazioni/germedigrano/

I have the page title h1 which is
"Germe di grano"
with html code:
<h1 class="title container" style="padding-left: 40px; width: 100%; font-weight: bold; font-size: 250%;">Germe di grano</h1>

Open in new window


Also in the right column I have an item with the same title but as an h3:
<li class="portfolio-item isotope-item category-germe-di-grano  has-thumbnail" style="position: absolute; left: 0px; top: 680px;"><div class="masonry-hover-wrapper"><div class="hover-desc"><div class="desc-inner"><h3 itemprop="headline" class="entry-title"><a href="http://temp.novelbread.com/informazioni/germedigrano/" class="link">Germe di grano</a></h3><div class="desc-wrappper"></div></div><div class="links-wrappper clearfix"><a rel="prettyphoto" href="http://temp.novelbread.com/immagini/WhatIsWheatGerm.jpg" class="zoom"><i class="icon-search"></i></a><a href="http://temp.novelbread.com/informazioni/germedigrano/" class="link"><i class="icon-link"></i></a></div></div><div class="image-wrapper scale-with-grid"><a href="http://temp.novelbread.com/informazioni/germedigrano/" class="link"><img width="325" height="203" itemprop="image" alt="WhatIsWheatGerm" class="scale-with-grid wp-post-image" src="http://temp.novelbread.com/immagini/WhatIsWheatGerm.jpg"></a></div></div></li>

Open in new window



How could I run a jQuery such that if the h1 = h3, then hide the entire li container with that h3?
Basically I don't want this page's thumbnail to show in the right column.

thanks in advance
badwolfffAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Tom BeckCommented:
Add the following jQuery to the document ready function at the bottom of the page.
var title = jQuery('h1.title').text();
	jQuery('div.wpb_wrapper ul.portfolio_group li.portfolio-item').each(function(){
		var thisLi = jQuery(this).find('h3.entry-title a').text();
		if (thisLi === title) {
			jQuery(this).hide();
		}
	});

Open in new window

The entire document ready function now looks like this:
<script>
//<![CDATA[
jQuery( document ).ready(function() {
    //jQuery("span.button_label:contains('SEE ALL PROJECTS')").closest("div").hide();
    jQuery( "#Subheader h1" ).prependTo( "#Content" ).css({'padding-left':'40px','width':'100%','font-weight':'bold','font-size':'250%'}).addClass('container');
    jQuery('#Subheader ul.breadcrumbs').css({'float':'left','text-align':'left','padding-left':'20px','width':'100%'});
	var title = jQuery('h1.title').text();
	jQuery('div.wpb_wrapper ul.portfolio_group li.portfolio-item').each(function(){
		var thisLi = jQuery(this).find('h3.entry-title a').text();
		if (thisLi === title) {
			jQuery(this).hide();
		}
	});
});
//]]>
</script>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
jQuery

From novice to tech pro — start learning today.