$(".unitHeading").click(function(){
urls = this.id;
heading = $(this).data("id");
rendition.display(urls);
classname = $('iframe').contents().text(heading).find('class');
console.log(classname);
return false;
});
I have an iframe file where I am going to find the class name with the help of text here text means heading. For example <p class="block_7">Hello World</p> through Hello World I need to fine class i.e block_7. How can I do this?