I can do something like this:
$(document).ready(function(){
$(".schedule_link").colorbox({width:"95%", innerHeight:344, iframe:true});
});
to attach the colorbox to a link …
<a class='schedule_link' href="index.html">Schedules</a>
… but what is the syntax to attach it to an imagemap like this?
<map name="mymap">
<area shape="rect" coords="496,500,729,523" href="??call JQuery??">
</map>
Colorbox actually operates on a
.live()handler that listens for clicks on elements with thecboxElementclass. Since it gets thehrefoff the element and adds that class, it’s not<a>dependent, you can just do:And your jQuery to bind these in one go, no need on a class for each
<area>, for example: