I am using an extended version of Lightbox called SexyLightbox. It uses jQuery as its structure. When I initialize it, I get this error with regular inverse values, when the lightbox is not working and an infinite number of times when I try to show the image:
Error: $ is undefined
Source File: http:
Line: 12
The initialization of the script is as follows:
<link rel="stylesheet" href="sexylightbox/sexylightbox.css" type="text/css" media="all" />
<script type="text/javascript" src="sexylightbox/jquery.min.js"></script>
<script type="text/javascript" src="sexylightbox/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="sexylightbox/sexylightbox.v2.3.jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
SexyLightbox.initialize({color:'black', dir: 'sexyimages'});
});
</script>
UPDATE So - I replaced the library, I am using the unpacked version of sexylightbox. FireBug points to an error in the jQuery.bind () function, specifically in bold:
jQuery.bind = function(object, method){
var args = Array.prototype.slice.call(arguments, 2);
return function() {
var args2 = [this].concat(args, $.makeArray( arguments ));
return method.apply(object, args2);
};
};
Used jQuery version 1.3.2.
Any thoughts on what might happen?
solvable
The problem was the encoding error for the SexyLightbox author code. Used by $ in jQuery.bind () to $.