Joomla com media image select Property '$' of object [object Object] is not a function index.php

StackOverflow https://stackoverflow.com/questions/22321760

문제

I'm building a website in Joomla 3.1, within the Zoo area it uses the Com_media to select for the image. I can use it to browser images, but the pop up gives the error

Uncaught TypeError: Property '$' of object [object Object] is not a function

While browsing the images and clicking on the one I want to use I get the second error

Uncaught TypeError: Cannot call method 'populateFields' of undefined

Any help to resolve these would be great.

도움이 되었습니까?

해결책

When you load jQuery noconflict, the dollar sign $ stops beying connected to jQuery. So you should use jQuery() instead of $().

Keep in mind that MooTools also uses the dollar sign. This MooTools method is for selecting a element by ID and can be replaced by document.id()

The tricky part, if you have both MooTools and jQuery code is to know which library the dollar bellongs to. In the error you pointed above I think its just to replace the $ by jQueryar the line of the error.

다른 팁

Try changing the $ to jQuery where the error is occurring in your code. It is my understading that the issue occurs due to the no conflict jQuery file being loaded in by Joomla:

<script src="/solent/media/jui/js/jquery-noconflict.js" type="text/javascript"></script>

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top