2011-07-19 16 views
1

hmmmm ....

私は混乱しています。

joomla 1.6より前のモジュールからjoomla 1.5 を実装しようとしました。

ページを更新しようとしたときに、 このエラーが常に発生します。

$ Eは ソースファイルに定義されていません。http://localhost/p.net/templates/jabellatrix/scripts/ja.collapsible.js ライン:13

それは何ですが?私は知らないよ。 mooToolsの問題かjqueryの問題かはわかりません。

誰かがこれについて少しの言葉を共有することができますか?

とにかくここでは、上記のjavascriptソースコードがあります。 Source Code Link

答えて

2

これは、古いコードがあることを意味します。 $ Eはmootools 1.1xからのもので、最初に一致する要素を返すにはdocument.getElement("selector");を参照しています。

$E = document.getElement;ご希望の場合は、より互換性のある別の折り畳み式スクリプトをご覧ください。チャンスは - これは唯一の壊れたAPIの変更ではない。

完全なコードはでした:私はここに新しい問題が発生した

/* 
Function: $E 
    Selects a single (i.e. the first found) Element based on the selector passed in and an optional filter element. 
    Returns as <Element>. 

Arguments: 
    selector - string; the css selector to match 
    filter - optional; a DOM element to limit the scope of the selector match; defaults to document. 

Example: 
    >$E('a', 'myElement') //find the first anchor tag inside the DOM element with id 'myElement' 

Returns: 
    a DOM element - the first element that matches the selector 
*/ 

function $E(selector, filter){ 
    return ($(filter) || document).getElement(selector); 
}; 
+0

waaah、 ... 私は実際に($(フィルター)||文書).getElement(セレクタ)をつかむためにウルのヒントに従ってください; でも、 私は行の上に別のヌル値を持っています el.elmain.getStyle( 'height')。toInt(); 私が上に共有しているソースコードより上で使用するのは無効ですか? – gumuruh

関連する問題