PDA

View Full Version : Problems with Glossy Accordion and Image Captions



shanksta13
06-18-2009, 05:28 PM
1) Script Title: Glossy Accordion module for Joomla

2) Script URL (on DD): ???

3) Describe problem: I'm having an issue with the Glossy Accordion menu causing my Joomla installation not to recognize the image caption classes, causing my captions on images to disappear. I know it has to do with the javascript not being compatible with Mootools, but haven't been able to fix it.

I referred to this thread and implemented the listed steps, but still couldn't get it to work.

Thread: http://www.dynamicdrive.com/forums/showthread.php?t=40973

Here is an example page of the image captions not showing up when the accordion module is published: http://secsportshub.com/sec-basketball/tennessees-tyler-smith-will-return-for-senior-season


Any help or step-by-step instructions would be greatly appreciated!

ddadmin
06-18-2009, 11:31 PM
Inside the .js file, what happens if you add the line in red to the existing line below?


jQuery.noConflict()
jQuery(document).ready(function($){
"
"

shanksta13
06-19-2009, 12:12 AM
Inside the .js file, what happens if you add the line in red to the existing line below?


jQuery.noConflict()
jQuery(document).ready(function($){
"
"

I found something afterwards that helped to make it work. This is the code I added at the end of the jquery.js file:


jQuery.noConflict();

// UPGRADE: The following attribute helpers should now be used as:
// .attr("title") or .attr("title","new title")
jQuery.each(["id","title","name","href","src","rel"], function(i,n){
jQuery.fn[ n ] = function(h) {
return h == undefined ?
this.length ? this[0][n] : null :
this.attr( n, h );
};
});

// UPGRADE: The following css helpers should now be used as:
// .css("top") or .css("top","30px")
jQuery.each("top,left,position,float,overflow,color,background".split(","), function(i,n){
jQuery.fn[ n ] = function(h) {
return h == undefined ?
( this.length ? jQuery.css( this[0], n ) : null ) :
this.css( n, h );
};
});

// UPGRADE: The following event helpers should now be used as such:
// .oneblur(fn) -> .one("blur",fn)
// .unblur(fn) -> .unbind("blur",fn)
var e = ("blur,focus,load,resize,scroll,unload,click,dblclick," +
"mousedown,mouseup,mousemove,mouseover,mouseout,change,reset,select," +
"submit,keydown,keypress,keyup,error").split(",");

// Go through all the event names, but make sure that
// it is enclosed properly
for ( var i = 0; i < e.length; i++ ) new function(){

var o = e[i];

// Handle event unbinding
jQuery.fn["un"+o] = function(f){ return this.unbind(o, f); };

// Finally, handle events that only fire once
jQuery.fn["one"+o] = function(f){
// save cloned reference to this
var element = jQuery(this);
var handler = function() {
// unbind itself when executed
element.unbind(o, handler);
element = null;
// apply original handler with the same arguments
return f.apply(this, arguments);
};
return this.bind(o, handler);
};

};

// UPGRADE: .ancestors() was removed in favor of .parents()
jQuery.fn.ancestors = jQuery.fn.parents;

// UPGRADE: The CSS selector :nth-child() now starts at 1, instead of 0
jQuery.expr[":"]["nth-child"] = "jQuery.nth(a.parentNode.firstChild,parseInt(m[3])+1,'nextSibling')==a";

// UPGRADE: .filter(["div", "span"]) now becomes .filter("div, span")