I have a web page that I am updating, this page uses Prototype along with Lightbox. I would not want to change the current page to jQuery-only, as I am not sure what else is using Prototype and will subsequently be broken if I no longer include Prototype.
My problem is this:
I have several TDs that I would like to fade out and fade out at the click of a button. This works great when I temporarily take out the Prototype. As soon as I get back to Prototype, the fadeOut()jQuery function will completely break. I suspect this is because Prototype also has fadeIn()and functions fadeOut().
Is there a way to make Prototype not recognize these functions as its functions and still have jQuery perfect for them?
Here is my jQuery code:
var $j = jQuery.noConflict();
$j(document).ready(function () {
$j("a.archiveBtn.2009").click(function () {
$j("td.archive.2009").fadeIn();
$j("tr td.archiveBtn").css("paddingBottom", 20);
$j("tr td.archiveBtn").css("borderBottom", "#999 1px dashed");
$j("a.hideArchive.2009").show();
return false;
});
$j("a.hideArchive.2009").click(function () {
$j("td.archive.2009").fadeOut(function () {
$j("tr td.archiveBtn").css("paddingBottom", 0);
$j("tr td.archiveBtn").css("borderBottom", "none");
});
$j(this).hide();
return false;
});
$j("tr td.archiveBtn").parent().prev("tr").children("td").css("paddingBottom", 20);
});
Any help would be appreciated and appreciated in advance.
source
share