WebsiteBaker Community Forum

WebsiteBaker Support (2.8.x) => jQuery => Topic started by: Argos on August 17, 2009, 01:50:47 AM

Title: WB2.8 & jquery
Post by: Argos on August 17, 2009, 01:50:47 AM
I searched everywhere but can't find any info on how to use the jQuery framework that comes with WB2.8. What if I see some nice jQuery thingy somewhere, and want to use it. How do I go from there? Before, you just had to put the commands in the head of the template, but now what?
Title: Re: WB2.8 & jquery
Post by: Luisehahne on August 17, 2009, 01:53:19 AM
I upload 3 files from my template to look how to bind.

1) index.php see head with css
2) javascript before body end


[gelöscht durch Administrator]
Title: Re: WB2.8 & jquery
Post by: Argos on August 17, 2009, 02:04:56 AM
Thanks Dietmar. Do I understand it right that you still have to add the lines to the template? So no jQuery stuff is already loaded automatically?

What do these lines do? Are they needed when jQuery is used?
Code: [Select]
// load jquery API

<script src="<?php echo TEMPLATE_DIR?>/javascript.functions.js" type="text/javascript"></script>

Sorry, still confused...  :roll:
What exactly is the differerence between pre-2.8 and 2.8 regarding jQuery?
Title: Re: WB2.8 & jquery
Post by: Luisehahne on August 17, 2009, 02:10:13 AM
in my template i bind all js external

in the jquery_api.js are the default loads with jquery scripts
in the javascript.function s.js are the jquery functions

It's my way to included the scripts and function, And my modules use frontend.css, frontend.js to load in the head
and the frondend_body.js in the body

And some css are loaded with jquery-insert.js on the fly when they are needed.

And now i will be going sleeping

Trusted Dietmar

Title: Re: WB2.8 & jquery
Post by: BerndJM on August 17, 2009, 02:45:18 AM
try to give a short resume:

the jQuery-stuff was shipped with 2.8 because it was used a little bit in the backend and a few never modules use it. One of the next steps will be, to replace the YUI stuff in the backend with equivalent jQuery.

The decision to use jquery was the easier handling and to give (module)developers an easy to handle framework, without the need to bind the necessary scripts into the modules and give a common base for the jquery framework to avoid trouble with different modules loading their "own" jquery.js

There is per default no jquery functionality for the front end. But you can use all the nice jquery features in your template by calling the main scripts from the include-folder, if necessary add your own jquery-plugins, and so on.
You can do this the conventional way like described on the jquery pages or in a more "expert" way like in the examples from Dietmar.

If I wrote some bullshit, please correct me.

Regards Bernd
Title: Re: WB2.8 & jquery
Post by: Argos on August 17, 2009, 03:09:30 AM
Aaah! Now I understand better, thanks a lot. I can now try to understand Dietmars advanced stuff as well, it was too technical for me to comprehend at first.