I have a Magento site, which includes the prototype JavaScript library.
Some time ago, I added jQuery as well.
Before that however, I'd included a prototype based Lightbox. It was triggered by adding the attribute rel="lightbox[gallery]"
.
Now I'd like to make a lightbox appear on page load. I know nothing about prototype, so I tried creating a hidden link with jQuery and then calling $('#special').click()
but to no avail. If I actually click the link however, it works fine.
So does jQuery's click()
only trigger events that jQuery has binded? If so, how could I call the click event or trigger the lightbox in prototype?
UPDATE
Sorry, should of cleared some things up.
All my jQuery code is in a function like so
jQuery.noConflict();
jQuery(function($) {
// Now I can use $ in here... :)
});
ANOTHER UPDATE
I've also thought about it, and does a framework being called prototype mean that it adds extra functionality via the prototype property? This could very well be the cause of problems. And IIRC, jQuery does for (i in obj) {}
in places which may be accessing more than it'd like to (up the prototype chain).