I have been using jQuery overlays that appear to only work on jQuery version 1.2.6 or less. The overlay code came from jQueryTools: http://jquerytools.org/demos/overlay/index.html. It’s not a plugin, I only have to include the jQuery library to make it work.
The code I use to show an overlay is:
<a rel="#account_overlay">Open Overlay</a>
<div class="simple_overlay" id="account_overlay">
// content
</div>
<script>
$("a[rel]").overlay({
mask: '#000000',
close: "a.close_overlay_btn",
closeOnClick: true,
closeOnEsc: true
});
</script>
Surely there is a way to modify this to work on latest versions of jQuery, I can’t see why it doesn’t. Any suggestions on how to modify it to work on 1.7+?
In Console, I see this error:
Uncaught TypeError: Object [object Object] has no method ‘overlay’
I would prefer not to replace all overlays in my project, as there are toooo many, I would just like to modify it so I can use the latest version of jQuery. So, I’d rather not see suggestions to swap service/plugin/ui etc, I would just like to know if this is possible.
I’m pretty sure you need to include jQuery Tools for the overlay to work since neither jQuery nor jQuery UI have a built-in overlay function. Even the example page points to
<script src="http://cdn.jquerytools.org/1.2.7/full/jquery.tools.min.js"></script>