Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

$ is not a function


Go to End


19 Posts   6633 Views

Avatar
Gene

Community Member, 41 Posts

14 January 2011 at 1:43pm

I had the same issue with SimpleTinyMCEField. I found it easier to wrap the config javascript in a...

(function($) {
// code...
})(jQuery);

which passes it the jQuery object. Then you don't have to modify all the dollar signs in the code to use 'jQuery' or turn on noconflict.

The config...

(function($) {
$(function() {
$('#%s').tinymce({
plugins : '%s',
theme : '%s',
%s,
theme_advanced_toolbar_location : '%s',
theme_advanced_toolbar_align : '%s',
theme_advanced_statusbar_location : '%s',
theme_advanced_resizing : %s,
paste_auto_cleanup_on_paste : true,
paste_remove_spans: true,
paste_remove_styles: true,
content_css : '%s'
%s
});
});
})(jQuery);

Avatar
idefix

Community Member, 11 Posts

12 February 2011 at 1:46am

Edited: 12/02/2011 1:50am

Is there any stable version now of the problem of conflict?
Especially in addition to the module DataObjectManager.

Avatar
Quadra

Community Member, 16 Posts

9 April 2011 at 2:21am

@Gene your solution worked for me. Nice one, thanks.

Go to Top