I need to do the following:
When access mysite.com check if another page X contain div id "intro", if so, redirect mysite.com to mysite.com/search. If page x does not contain div id, load mysite.com.
I tried this:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
<script type="text/javascript">
jQuery(function($){
$('#result').load('Page2.html #intro');
});
</script>
page with div id :
<div id="intro" style="display: none">My sample content</div>