View Full Version : Script problem (interference somehow)

12-04-2009, 01:28 AM
I have a problem I just can't seem to solve. Seems to be an interference of two scripts.

But have checked no duplicate function names or variables. Tried altering script order too.

The one that breaks, breaks on this line:

$('*[@title^="ajax:"]').each(function(index){ ...

which I don't fully understand. The expression is a jQuery loop thing I believe. index seems to be null. I can't see where index is defined.

What the code at this point aims to do is check for the phrase ajax: in all links on the page and do some manipulation so that the contents of the link are shown in a a tooltip.

The problem is not about ajax.

The full script is here: http://www.javascriptkit.com/script/script2/ajaxtooltip.shtml

The problem occurs when the page includes the editor script, such as here: http://www.tji-java-ide.com/beijing/index.php?option=com_content&view=article&id=124%3Anew-spelling-typo-checker-for-articles-and-blogs&Itemid=1

The links on the top of the page work fine when there is no editor present, such as here: http://www.tji-java-ide.com/beijing/index.php?option=com_content&view=frontpage&Itemid=1

12-04-2009, 02:25 AM
index just stands for the array index. The first part must be shorthand for an array of all the elements matching the pattern.

The editor doesnt use jQuery.

Maybe I can try replacing this part of the script to use standard js rater than jQuery...?