Commit a27054e0 authored by jonnybradley's avatar jonnybradley

[FIX] More on colorbox - removing default for iframe as it conflict with photo being a default.

Links for iframes will need "type=iframe" in the rel to work as an iframe.
parent acc55623
......@@ -240,7 +240,7 @@ $jq(document).ready( function() { // JQuery's DOM is ready event - before onload
// for every link containing 'shadowbox' or 'colorbox'
$jq("a[rel*='box']").colorbox({
transition: "elastic",
height:"95%",
maxHeight:"100%",
overlayClose: true,
title: true
});
......@@ -255,8 +255,7 @@ $jq(document).ready( function() { // JQuery's DOM is ready event - before onload
// rel containg slideshow
$jq("a[rel*='box'][rel*='slideshow']").colorbox({
slideshow: true,
preloading: false,
height: "100%"
preloading: false
});
// inline content: hrefs starting with #
$jq("a[rel*='box'][href^='#']").colorbox({
......@@ -268,7 +267,9 @@ $jq(document).ready( function() { // JQuery's DOM is ready event - before onload
}
});
// href starting with http(s) or no image link
$jq("a[rel*='box'][href^='http://'], a[rel*='box'][href^='https://'], a[rel*='box'][href!='&display']").colorbox({
//$jq("a[rel*='box'][href^='http://'], a[rel*='box'][href^='https://'], a[rel*='box'][href!='&display']").colorbox({
// the line above seems to be breaking images with links - assuming that all images contain '&display' in the href seems to restrictive
$jq("a[rel*='box'][rel*='type=iframe']").colorbox({
iframe: true,
width: "95%"
});
......@@ -308,24 +309,7 @@ $jq(document).ready( function() { // JQuery's DOM is ready event - before onload
ret = $jq(this).attr("rel").match(re);
return ret[2];
}
});
// rel containg foobox[bar] to group objects in "galleries" (shadowbox compatible) TODO: buggy (applies after first display of the object), must be done with live() jQuery function maybe
/*colorboxgroups = function () {
re = /(box\[([^\]]*)\])/i;
ret = $jq(this).attr("rel").match(re);
return ret[2];
};
$jq("a[rel*='box\[']").attr("rev",colorboxgroups);
$jq("a[rev]").colorbox({
rel: function(){
return $(this).attr('rev');
}
});*/
});
}
}); // end $jq(document).ready
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment