I would like to do the following however it does not work. Again I’m sure it should
be simple but I cannot get it to compile.
$(".villa-caller").colorbox({
innerWidth: "850px",
innerHeight: "500px",
inline: true,
href: "#"+$(this).attr("rel")+"",
onClosed:function(){colorbox_closed();}
});
On the href parameter I am using jQuery syntax to get the value of the rel attribute from the clicked element.
Thanks for the help
I believe the problem here is due to the scope of
this. Try the following:This should ensure that
thisis the.villa-callerelement you are initialising thecolourboxon.