Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jun 2013
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Uncaught TypeError but works on first load

    Hey all. I'm new here and an amateur at this.

    My problem is at http://www.digital52.com.

    Click on the upper left "button" and then click on Album (second button after open). It works. Then click Blog, which works. Then click Album again, which it doesn't work. Everything else still does except Album.

    Album works every time until I open Blog.

    I get error:
    Uncaught TypeError: Object [object Object] has no method DOPThumbnailGallery
    This error is from /js/main.js on line 19:
    Code:
    $('#galleryContainer').DOPThumbnailGallery();
    Watching through Chrome "Inspect Element" and I see nothing fishy going on but I'm also not very good at spotting errors with as little experience as I have at this. My problem is that this works until I click Blog, then it fails. Everything else still works.

    I've been working on this for a while trying to find out why, using different versions of jQuery and searching through forums/google.

    Thanks for any help anyone can provide, really.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,038
    Thanks
    23
    Thanked 589 Times in 588 Posts
    Take the $(document).ready(function(){...} out of the loadpictures() function.
    Code:
    function loadpictures()
    {
    	$('#galleryContainer').empty();
    			$('#galleryContainer').width($(window).width());
    			$('#galleryContainer').height($(window).height());
    			$(window).resize(function()
    			{
    				$('#galleryContainer').width($(window).width());
    				$('#galleryContainer').height($(window).height());
    			});
    			$.getScript("/ThumbnailGallery/js/jquery.mousewheel.js");
    			$.getScript("/ThumbnailGallery/js/jquery.jscrollpane.min.js");
    			$.getScript("/ThumbnailGallery/js/jquery.dop.ThumbnailGallery.min.js");
    			$('#galleryContainer').DOPThumbnailGallery();
    }
    Evolution - The non-random survival of random variants.

  • Users who have thanked sunfighter for this post:

    noisome (06-15-2013)

  • #3
    New to the CF scene
    Join Date
    Jun 2013
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sunfighter View Post
    Take the $(document).ready(function(){...} out of the loadpictures() function.
    I've done it, but it still performs identical with the error. Thanks however for removing an unneeded line.

  • #4
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,038
    Thanks
    23
    Thanked 589 Times in 588 Posts
    Do me a favor and make your blog source a file. rename it http://www.digital52.com/blog/test.txt and see what that does.
    Evolution - The non-random survival of random variants.

  • Users who have thanked sunfighter for this post:

    noisome (06-15-2013)

  • #5
    New to the CF scene
    Join Date
    Jun 2013
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sunfighter View Post
    Do me a favor and make your blog source a file. rename it http://www.digital52.com/blog/test.txt and see what that does.
    I made it source http://www.digital52.com/test.txt and it no longer shows the issue. So something along the lines of what its requesting from blog/ side.

    Taking a further look. Thanks a lot for everything so far!

  • #6
    New to the CF scene
    Join Date
    Jun 2013
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sunfighter View Post
    Do me a favor and make your blog source a file. rename it http://www.digital52.com/blog/test.txt and see what that does.
    I did it using /test.txt and switching between the two worked. I investigated a little more now under the blog directory and removed from the php file being called:

    Code:
    <script src="http://code.jquery.com/jquery-1.9.0.js"></script>
    Now switching between the two works as expected, but now I'm confuzzled as to why. However the problem is solved!

    Thanks a lot!


  •  

    Posting Permissions

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