I have two classes. I want to hide frontpage_message class when content_message class appears. Problem is that I load stuff with Ajax where content_message class is located.
Below is my code. Works fine without Ajax.
// This is in Frontpage
<div class="frontpage_message">Frontpage Message</div>
// This is loaded with Ajax
<div class="content_message">Content Message</div>
$(document).ready(function(){
if ($(".content_message").text().length > 0) {
$('.frontpage_message').hide();
}
});
assume you have a ajax call like this