In my work, I changed the dialog boxes for fancybox, everything went dandy, even with minor problems, for example, to run it on pageload, but nothing that I could not manage.
but now I am facing a huge obstacle:
IE6 and IE7 uncontrollable behavior. I need to change the URL of the place where fancybox will be displayed. I could not find anything in the documentation except to add content, but not an identifier. So my question is: where am I mistaken?
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="http://fancybox.net/js/fancybox/jquery.fancybox-1.3.0.css" media="screen" />
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.1.min.js"></script>
<script type="text/javascript" src="http://fancybox.net/js/fancybox/jquery.easing-1.3.pack.js"></script>
<script type="text/javascript" src="http://fancybox.net/js/fancybox/jquery.mousewheel-3.0.2.pack.js"></script>
<script type="text/javascript" src="http://fancybox.net/js/fancybox/jquery.fancybox-1.3.0.pack.js"></script>
<script>
$(document).ready(function() {
jQuery.fn.cornyBox = function(selector) {
if (selector) { this.attr('href', selector); }
$(this).fancybox();
};
$('#aAlert').cornyBox('#dvAlert2');
});
</script>
</head>
<body>
<div id="alertHolder">
<a id="aAlert" href="#dvAlert1" >hit me</a>
<div id="dvAlert1" class='alert'>
something
</div>
<div id="dvAlert2" class='alert'>
something else
</div>
</div>
</body>
</html>
If I use $('#aAlert').cornyBox();, I have no problem, because obviously I am not setting a new href in the link.
It works on IE8, Firefox and Chrome. However, in IE6, IE7, no.