WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • jQuery »
  • WB2.8 & jquery
  • Print
Pages: [1]   Go Down

Author Topic: WB2.8 & jquery  (Read 9019 times)

Argos

  • Guest
WB2.8 & jquery
« 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?
Logged

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4548
  • Gender: Male
Re: WB2.8 & jquery
« Reply #1 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

Dietmar

[gelöscht durch Administrator]
Logged
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

Argos

  • Guest
Re: WB2.8 & jquery
« Reply #2 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]
<?php
// load jquery API
require_once("jquery_api.js");
?>

<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?
Logged

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4548
  • Gender: Male
Re: WB2.8 & jquery
« Reply #3 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

Logged
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

Offline BerndJM

  • Posts: 1764
  • Gender: Male
Re: WB2.8 & jquery
« Reply #4 on: August 17, 2009, 02:45:18 AM »
Mmmh,
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
Logged
In theory, there is no difference between theory and practice. But, in practice, there is.

Argos

  • Guest
Re: WB2.8 & jquery
« Reply #5 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.
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • jQuery »
  • WB2.8 & jquery
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2