Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 03:42:09 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155508 Posts in 21711 Topics by 7737 Members
Latest Member: simpleguy
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: WB2.8 & jquery  (Read 1103 times)
Argos
WebsiteBaker Org e.V.

Offline Offline

Posts: 2158


WWW
« on: August 17, 2009, 12: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

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Luisehahne
Board Member
Development Team
*****
Offline Offline

Posts: 3145



WWW
« Reply #1 on: August 17, 2009, 12: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
Logged

We are human beings - and nobody is perfect at all.
Argos
WebsiteBaker Org e.V.

Offline Offline

Posts: 2158


WWW
« Reply #2 on: August 17, 2009, 01: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:
<?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...  rolleyes
What exactly is the differerence between pre-2.8 and 2.8 regarding jQuery?
Logged

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Luisehahne
Board Member
Development Team
*****
Offline Offline

Posts: 3145



WWW
« Reply #3 on: August 17, 2009, 01: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

We are human beings - and nobody is perfect at all.
BerndJM

Offline Offline

Posts: 1764



« Reply #4 on: August 17, 2009, 01: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 bulls***, please correct me.

Regards Bernd
Logged

In theory, there is no difference between theory and practice. But, in practice, there is.
Argos
WebsiteBaker Org e.V.

Offline Offline

Posts: 2158


WWW
« Reply #5 on: August 17, 2009, 02: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

Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase: http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!