I have a old fashion page that uses a frameset containing a top frame and bottom frame. The frameset is defined in "index.html" and my code is as follows:
<html>
<head>
<script src="jquery-1.4.2.min.js" type="text/javascript"></script>
<script>
$(document).ready(function(){
$('#mainFrame').ready(function() {
$('#mainFrame a').live('click', function() {
alert('u click');
return false;
});
});
});
</script>
</head>
<frameset id="main" rows="125,*" cols="*">
<frame src="header.html" name="headerFrame" id="headerFrame" />
<frame src="main.html" name="mainFrame" id="mainFrame" />
</frameset>
</html>
I would like to be able to intercept links that are clicked on the frame "mainFrame". I thought I could just add a ready event for it then live bind click events but it doesn't work. Any ideas?
Note: The files are all on the same domain so this is not an XSS issue.