I can't see why this wouldn't
work:
$('h1:contains("test")').parents('body').addClass("test_class");

Reply via email to