Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
  1. #1
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times

    Help with Photo Gallery

    I have been trying to attempt this for a while now but not sure how i can best do this. I need to create a website with a photo gallery. Id like to use a few different methods but I'm not having much success. My latest attempt i have been trying to use FancyBox. I get a syntax error and I'm unable to figure it out. Is there an easier way to create the same result? Where i can have an image on the page that when clicked it will open a larger image on the same page, that also has buttons to navigate between previous and the next photo? Any help would be greatly appreciated! I haven't had much luck on this site getting help but I'm hoping someone can help me out with this at least.

    Heres the code that I'm getting a syntax error on when using FancyBox and a link to the step by step instructions i was using but unable to get the right results. How To Use FancyBox - jQuery Tutorial | Tutvid.com
    The error I'm getting is the 3rd line ( $(".fancybox").fancybox(); )
    Code:
    <script type="text/javascript">
    	$(document).ready(function() {
    		$(".fancybox").fancybox();
    	});
    </script>

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    The syntax looks fine. What is the exact error?
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  4. #3
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times

    Help with Photo Gallery

    I am working in dreamweaver, not sure how to figure out what error it is, as far as whats wrong with the syntax, but at the top of my dw project it says "There is a syntax error on line 51. Code hinting may not work until u fix error" and when i click the image the fancybox is suppose to pop it jp like in the video, but it opens in a new page instead? Is there anything else you may need to look at? Its an extremely small site and very simple, so theres not much coding, i could probably screen cap the code and see if that would help? I gotta figure this out tonight or tomorrow i will have to figure out a new way, this is all due monday and although it wont affect my grade since its not something we have learned, the friend im building the site for would really like it to work so eventually i will need to find a solution, just prefer to find it before i turn it in


    I also just realized this should probably be moved into the js/css section? I dont know if i need a mod to do this or how i can myself but i didnt even think about it until now
    Last edited by Vapr_Arts; Dec 07th, 2013 at 03:38 PM.

  5. #4
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Pull it up in the browser and use the console in the dev tools to see what the error is. DW is probably just throwing the error because that code uses jQuery. If you haven't linked jQuery (before you link the fancybox js), it won't work, and will throw an error.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  6. #5
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times

    Help with Photo Gallery

    Ok i found it in the error console.. "Failed to load resource: The requested url was not found on this server." For the jquery-latest.min.js and the jquery.fancybox.pack.js.. Somewhere i messed up on linking those 2.. Let me get on a computer and ill post how i linked it.. I may have messed up because i also link a sprysheet

    Ok i have actually fixed the syntax error, i messed up linking the 2 .js files.. But with the syntax error corrected it still opens up the image in a new page
    Last edited by Vapr_Arts; Dec 07th, 2013 at 04:27 PM.

  7. #6
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times
    ok i have now gotten it to pop up right but for some reason it doesn't have a box around the image and it doesn't have a way to close the image? I am just at point where i almost have it! but for some odd reason its missing something somewhere? During this small break between semesters I'm definitely going to be looking a lot more into JS but at the moment i really can't get it..where could i have gone wrong that it doesn't include the button to close the larger view?

  8. #7
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Did you link up the included CSS file?
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  9. #8
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times
    Quote Originally Posted by Ronald Roe View Post
    Did you link up the included CSS file?
    Yes i have


    Sent from my iPhone using Tapatalk

  10. #9
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times
    ok now i am at a point where i am about to go crazy!!! Project is due tomorrow! I somehow have gotten it to work inside of dreamweaver, if i use the LIVE view i can actually click the image and everything works properly!! but inside both safari and firefox it does not work right!! WHATS GOING ON!! Not to mention i am sick as hell with a cold of some sort and don't feel like doing this **** to begin with! PLEASE SOMEONE HELP!!! i am going to post some screenshots so you guys can see what i am doing.. I have created a separate page to test this so i don't have a lot of code in the way and i don't mess up my project changing things around...HELP!!!Screen Shot 2013-12-08 at 5.28.09 PM.jpgScreen Shot 2013-12-08 at 5.28.25 PM.jpgScreen Shot 2013-12-08 at 5.29.30 PM.jpg

  11. #10
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Are you running it with a web server software of some kind? A lot of times, if you just try to run it straight from the file, it won't work.


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 07:32 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com