I’ve integrated a gradient plugin into my website so my client can change his own background color. (the plugin website:
http://davidwees.com/myblog/2007/08/gradient_jquery_plugin.html).
Now this works perfectly on every single page,
except on the page which display a Maxigallery and the jQuery Lightbox associated with it.
my code:
Head Code:
<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="jquery.gradient.min.js"></script>
<script type="text/javascript" src="functions.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
setGradient('[*colour*]');
})
</script>
functions.js:
function setGradient(color)
{
if (color.substring(0,1) == '#')
{
color = color.substring(1);
}
$('body').gradient({ from: color, to: 'FFFFFF' });
}
Aswell as the code Maxigallery implenents into my head (just before the end of head):
<script type="text/javascript" src="http://<webpage>.nl/assets/plugins/qm/js/jquery.colorbox-min.js"></script>
<script type="text/javascript">
var $j = jQuery.noConflict();
$j(document).ready(function($)
{
$("a.colorbox").colorbox({width:"80%", height:"80%", iframe:true, overlayClose:false});
// Bindings
$().bind("cbox_open", function(){$("body").css({"overflow":"hidden"}); $("html").css({"overflow":"hidden"}); $("#qmEditor").css({"display":"none"});});
$().bind("cbox_closed", function(){$("body").css({"overflow":"auto"}); $("html").css({"overflow":"auto"}); $("#qmEditor").css({"display":"block"});});
// Hide QM+ if cookie found
if (getCookie("hideQM") == 1)
{
$("#qmEditor").css({"display":"none"});
$("#qmEditorClosed").css({"display":"block"});
}
// Hide QM+
$(".qmClose").click(function () {
$("#qmEditor").hide("normal");
$("#qmEditorClosed").show("normal");
document.cookie = "hideQM=1; path=/;";
});
// Show QM+
$("#qmEditorClosed").click(function () {
{
$("#qmEditorClosed").hide("normal");
$("#qmEditor").show("normal");
document.cookie = "hideQM=0; path=/;";
}
});
});
function getCookie(cookieName)
{
var results = document.cookie.match ( "(^|;) ?" + cookieName + "=([^;]*)(;|$)" );
if (results) return (unescape(results[2]));
else return null;
}
</script>
<link rel="stylesheet" type="text/css" href="http://<webpage>.nl/assets/plugins/qm/css/style.css" />
<!--[if IE]><link rel="stylesheet" type="text/css" href="http://<webpage>.nl/assets/plugins/qm/css/ie.css" /><![endif]-->
Now i was hoping for someone who had this before, and knows a solution, i’ve tried a couple of things with jQuery noConflict, but failing horribly.