Houston, we.. 've a jQuery problem-> noConflict

15 years 3 weeks ago #91013 by ndee
nant wrote:

Good reading ;)

For those of us that when looking at similar threads and the title ( :P ) think of all this as rocket science, please keep in mind that the CB Team puts a great deal of effort to get things right BEFORE handing over to test teams.

Of course some times this cycle appears to be insanely time consuming and patience taxing for our community but I guess if things are released earlier, then frustration would be just as bad and would impact live sites and live communities - I for one am thankful that this is the case.

Don't get me wrong - I feel that features should be added quicker and released faster. This is the goal. reaching this goal without compromising quality is the challenge.


Hi Nant,

you are right, quality should go over function. And as we see in the forums the code is already rock solid with minor issues. This is really a good release policy.

(with you I mean the CB team)
On the other hand you released a bunch of new plugins a few days ago. Maybe the community is more happy with minor features / plugins released more often. In this case you could have started to release plugin 1 one week later plugin 2 and so on. Would make the impression of a release fireworks B)

For me, it does not matter. I'm happy with all of your releases :D. So keep up the good work and quality while streamlining the development/project process.

###################
SPEED UP HELP, read first: Help us help you
###################

Please Log in to join the conversation.

15 years 3 weeks ago #91014 by beat
ndee wrote:

No, as written above I'm using J! 1.5.9 and CB 1.2.

Mootools 1.11 are loaded by Joomla! Core. Only the above mentioned RokSlideshow and Menu (w/o effects) and login module are published.

I will do some further tests and report back if I found something weird. For you RokSlideshow works with J!1.5.9 and CB 1.2, so I can be sure that RokSlideshow is not broken?


Sorry, I can not make any statements on code i didn't read. I just downloaded latest versions from extensions.joomla.org for rokSlideShow and tried as reported above.

For different reasons that I do not wish to go into details here, I believe mootools is broken by design, while jQuery has a great approach to its design. Seems that the users-list of jQuery shows that i'm not only one to think so.

Finally loading CSS before Javascript matters too, but unfortunately even core joomla 1.5.9 templates, save 3pd templates, didn't do it right yet.

Ok will check that. But doesn't $(document).ready() and its mootools counterpart ensure that all DOM and CSS is loaded before any action takes place?
This means if I make a custom module/plugin and load a .css there, it is likely that it will break? How can I inject module/cb plugin specific .css and .js files into the head of the document?

Thanks!


Again, please do more homework before posting assertions on CB's use of jQuery. CB does not do any $(document).ready() on purpose.

Exactly for that reason CB uses:
[code:1]jQuery(document).ready(function($){[/code:1]

and the way CB use jQuery makes it that the global $ isn't touched or used at all in CB and jQuery.

To my knowledge only jQuery allows that. B)

I posted into mootool's forum a post proposing to do something similar for mootools, but to my surprise, my friendly and constructive post got deleted 20 minutes later without any comment or mail :angry: . So making mootools non-conflicting was not a goal at all at that time, to the contrary unfortunately. Another reason that I will never use or recommend mootools.

I think that this closes pretty much this subject :)
(feel free to respond if you have a proven bug in CB or jQuery, or have found the reason of your site not working).

In short, final reply from Houston: :D

=========== NO BUGS IN CB ABOVE THIS LINE :) ============

EDIT: Fixed quoting of message

Post edited by: beat, at: 2009/03/07 13:09

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

15 years 3 weeks ago #91016 by ndee
beat wrote:

ndee wrote:

No, as written above I'm using J! 1.5.9 and CB 1.2.

Mootools 1.11 are loaded by Joomla! Core. Only the above mentioned RokSlideshow and Menu (w/o effects) and login module are published.

I will do some further tests and report back if I found something weird. For you RokSlideshow works with J!1.5.9 and CB 1.2, so I can be sure that RokSlideshow is not broken?


Sorry, I can not make any statements on code i didn't read. I just downloaded latest versions from extensions.joomla.org for rokSlideShow and tried as reported above.

As I did, I do not use this module but wanted to test mootools compatibility ;)

For different reasons that I do not wish to go into details here, I believe mootools is broken by design, while jQuery has a great approach to its design. Seems that the users-list of jQuery shows that i'm not only one to think so.

Full ack, don't like it either. Although I can't tell you any technical downsides of mootools - for me the way it works is not as good as jQuery's. But it is just a feeling without technical verfication. That's why I as many other suggested on joomla.org to include jQuery instead of mootools. But fact is that mootools is included in Joomla! Core and is widely spread and there are many extensions out there using it.

Finally loading CSS before Javascript matters too, but unfortunately even core joomla 1.5.9 templates, save 3pd templates, didn't do it right yet.

Ok will check that. But doesn't $(document).ready() and its mootools counterpart ensure that all DOM and CSS is loaded before any action takes place?
This means if I make a custom module/plugin and load a .css there, it is likely that it will break? How can I inject module/cb plugin specific .css and .js files into the head of the document?

Thanks!

Again, please do more homework before posting assertions on CB's use of jQuery. CB does not do any $(document).ready() on purpose.

Exactly for that reason CB uses:
[code:1]jQuery(document).ready(function($){[/code:1]

and the way CB use jQuery makes it that the global $ isn't touched or used at all in CB and jQuery.

To my knowledge only jQuery allows that. B)

Calm down. I know that jQuery does not use $ but noConflict() thingy instead - was an example and focus on DOM ready function which should ensure that the DOM tree is complete before any action takes place ;) My question was if there would be any troubles if I write a plugin and include my custom jQuery code and .css files there.

I posted into mootool's forum a post proposing to do something similar for mootools, but to my surprise, my friendly and constructive post got deleted 20 minutes later without any comment or mail :angry: . So making mootools non-conflicting was not a goal at all at that time, to the contrary unfortunately. Another reason that I will never use or recommend mootools.

I think that this closes pretty much this subject :)
(feel free to respond if you have a proven bug in CB or jQuery, or have found the reason of your site not working).

In short, final reply from Houston: :D

=========== NO BUGS IN CB ABOVE THIS LINE :) ============

EDIT: Fixed quoting of message

Post edited by: beat, at: 2009/03/07 13:09

Ok Houston, thank you for your time.

Post edited by: ndee, at: 2009/03/07 13:25

###################
SPEED UP HELP, read first: Help us help you
###################

Please Log in to join the conversation.

15 years 3 weeks ago #91019 by beat
ndee wrote:

...
My question was if there would be any troubles if I write a plugin and include my custom jQuery code and .css files there.


Ah, sorry, didn't see that question before in all of above :D

Sure, no problem, any CB plugin can use jQuery from CB, only things to make sure all runs well is to use CB's API for jQuery, as you can see in ProfileBook for example. Search for jQuery in there, and see the jQuery methods used in there in $_CB_framework. (The CB 1.2 API doc is still on our todo list).

This automatically loads jQuery, and required jQuery plugins, in the right order, and places your code safely in the right place of the page, and allows you to use $ as jQuery variable.

Keep in mind that CB 1.2 has very latest jQuery 1.3 version, and that removed the already depreciated use of @ in the CSS selectors, so that's the main incompatibility to jQuery 1.2 existing code, but it adds a wealth of new functions and a factor of up to 30 in speed over jQuery 1.2 and mootools 1.1.

Post edited by: beat, at: 2009/03/07 13:34

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

14 years 5 months ago #115109 by piersol
When i have the CB ProfileBook latest blogs module published, I get IE errors.

object doesnt support this property or method


The error referenced the line in my "view code" of the homepage as that of the jquery no conflict script in comprofiler directory.

When i disable the CBpblatest module this goes away and the site has no IE Errors.

This is the site without errors. Any ideas why loading the cbpblatest module would cause my site to have errors?

Please Log in to join the conversation.

14 years 6 days ago #127730 by Minnie Mouse
Replied by Minnie Mouse on topic Re:Houston, we.. 've a jQuery problem-> noConflict
hi, this was a long confusing thread so sorry if this has already been mentioned. the problem you are experiencing ... that i finally figured out is not between CB / jQuery and Mootools its that if you use other mods with jQuery loading they conflict. so if you look at your code you will see jquery loading multiple times and multiple noconflict declarations. i was using rokbox, CB and superfish menus. the menus died on the registration page for the above reason.

there should be a way to also check for modules loading scripts so that all jquery can just be loaded one time.

sorry its not just that of course, but also the positions they all get loaded in and the adhoc way each developer intitiates the noconflict statement.
MM

Post edited by: Minnie Mouse, at: 2010/03/23 00:13

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.204 seconds

Facebook Twitter LinkedIn