views:

34

answers:

1

Hello. I am working on my personal website and am learning javascript (started yesterday) -

My computer is a Mac and I couldn't find on the Internet how to utilize javascript on Adobe Dreamweaver CS4. Specifically, I am trying to use a photo slideshow called Galleria. On PCs, they say to drop the .js file into one of Dreamweaver's folders.

These are the steps:

Galleria 1.2 is currently in beta. You try it yourself in it's simpler form by following these simple steps:

  1. Download Galleria (Nightly build)
  2. Unpack etc.
  3. Include jquery and Galleria:

    < script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">&lt; /script>

    < script src="galleria/src/galleria.js">< /script>

  4. Load a theme:

    < script>Galleria.loadTheme('galleria/themes/galleria.classic.js');< /script>

  5. Add images:

    < div class="images">< img src="me.jpg">< img src="you.jpg">

  6. Fire upp Galleria:

    < script>$('.images').galleria();< /script>

Is step 3 calling jQuery and Galleria for me so I don't need to put the .js file somewhere? Or do I need to upload the .js file to my website and then change this line to suit -

< script src="galleria/src/galleria.js">

Can someone enlighten me please?

Thanks.

+1  A: 

The first script tag, <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt; is including the script from an external server, googleapis.com. You don't need to worry about that script.

The second one, <script src="galleria/src/galleria.js"> points to galleria.js in the galleria/src folder. It's a relative path so the galleria folder should be in the same folder as your web page file.

If you upload the galleria.js file to galleria/src, you won't need to change any lines.

SimpleCoder
Thanks! I FTP-ed the galleria.js to my website. Should work now!
Rhea
No problem, good luck!
SimpleCoder