dcsimg
www.webdeveloper.com
Results 1 to 6 of 6

Thread: Question regarding jquery GalleryView

  1. #1
    Join Date
    Aug 2010
    Posts
    3

    Question regarding jquery GalleryView

    Hi,

    Apologies in advance, I'm not too good with java (prompting my request from more able people). I've read the posting guidelines so will be as descriptive as possible.

    I'm attempting to install a plugin called Galleryview which creates a gallery that looks a lot like this: http://spaceforaname.com/gallery-light.html.

    I am attempting to install this into my relatively empty website. The installation notes are as such:

    INSTRUCTIONS FOR USE
    ---------------------------------
    1) Place galleryview-x.x folder somewhere in your website directory structure (you can rename this folder if desired)
    2) Include script tags for the desired version of the script (uncompressed, packed) and for the included jQuery Times plugin file
    3) Include a reference to the galleryview.css stylesheet in your document
    4) Create an unordered list in your HTML with the content you wish to be displayed in your gallery (see below for more information on markup options
    5) Call the GalleryView plugin with the function call below:

    $('#id_of_list').galleryView()

    To override default option values, include them in JSON format in the call to the plugin, like so:

    $('#id_of_list').galleryView({
    gallery_width: 800,
    gallery_height: 600,
    frame_width: 120,
    frame_height: 90,
    pause_on_hover: true
    });

    Refer to the uncompressed javascript to see a full list of options, their effects on the plugin and their default values.




    I have downloaded the plugin, unzipped and then uploaded to my server. It is saved within the ./galleryview folder and the links to the .js files are correct. My HTML code within the HEAD tag is as follows:



    <link type="text/css" rel="stylesheet" href="galleryview/galleryview.css" />
    <script type="text/javascript" src="galleryview/jquery.easing.1.3.js"></script>
    <script type="text/javascript" src="galleryview/jquery.galleryview-2.1.1.js"></script>
    <script type="text/javascript" src="galleryview/jquery.galleryview-2.1.1-pack.js"></script>
    <script type="text/javascript" src="galleryview/jquery.timers-1.2.js"></script>
    <script type="text/javascript">

    $(document).ready(function(){
    $('#gallery').galleryView({
    gallery_width: 420,
    gallery_height: 320,
    frame_width: 120,
    frame_height: 90,
    pause_on_hover: true
    });
    });

    </script>

    And in the BODY tag is:
    <ul id="gallery" class="galleryview">
    <li><img src="images/guitar1.jpg" alt="image1" /></li>
    <li><img src="images/guitar2.jpg" alt="image2" /></li>
    <li><img src="images/guitar3.jpg" alt="image3" /></li>
    <li><img src="images/guitar4.jpg" alt="image4" /></li>
    <li><img src="images/guitar5.jpg" alt="image5" /></li>
    </ul>


    Unfortunately the plugin just fails and the site loads all the photos in an unordered list. No error message which is a shame as it may point me in the right direction.

    One area I may be failing is the concept of packing/unpacking - does this simply mean unzipping or is this a term specific to javascript? Or is there a glaring mistake in my code?

    Thanks in advance to any intelligent being who is able to assist

  2. #2
    Join Date
    Aug 2010
    Posts
    3
    I think I've put too much detail

  3. #3
    Join Date
    Feb 2010
    Location
    Berlin
    Posts
    97
    First, it's JavaScript and not Java. Big difference ;-)

    Secondly, the GalleryView feature is built on the jQuery library which means you should embed the basic jQuery lib in the <head> of your file:
    Code:
    <script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
    Hope this helps.
    What desert?

  4. #4
    Join Date
    Aug 2010
    Posts
    3
    Thank you very much indeed, that did the trick.

    For any other newbies regarding this thread for a solution: I went to www.jquery.com and downloaded the jquery file (there's a big 'download' button on the front page), uploaded it to my webspace and inserted the code that Pris mentioned above. I downloaded 1.4.2 so I made sure I saved it in the 'js' folder and changed the code from 1.3.2 to 1.4.2

  5. #5
    Join Date
    Feb 2010
    Location
    Berlin
    Posts
    97
    Glad to hear you solved your problem.
    What desert?

  6. #6
    Join Date
    Aug 2010
    Posts
    1

    Same issue

    I did all that was noted and still can not get it to work. Do I need to replace all of the previous Java Script with:

    <script type="text/javascript" src="galleryview/jquery-1.4.2.min.js"></script>

    after I download the .js file or do I need to add it on top?

    I would appreciate any help.

    Thanks

    -Justin

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center