D
D
DenisO2011-10-19 14:34:42
Mootools
DenisO, 2011-10-19 14:34:42

Mootools - $ function is not available, although $$ works fine

I'm writing an extension for chrome. I connect mootools. Inline or external js.

I use the sorry version with compatability.

The $$ function is available, and it produces
bound: function ()
{
return document.querySelectorAll.apply(document, arguments)
}

But the $ function (or document.id, whichever I understand) is undefined. How to treat?

On the page, by the way, Mootools is also there. Maybe a conflict is possible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2011-10-19
@k12th

Usually compatibility means that the library tries not to pollute the global namespace. This is especially true for the $ function, because a function with this name is used by at least 3 libraries.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question