get parent element of div based on div content

get parent element of div based on div content

Hi,

I try to get the parent element of a div based on the div content:

  1. ($('div:contains("' + BaseHtml + '")').parent().html();

  2. where BaseHtml is the content of the div. but this always return null.
    How can I do?