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 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2008
    Posts
    446
    Thanks
    23
    Thanked 5 Times in 5 Posts

    function undefined

    I am using a jcarousel lite plugin and trying to get it to show a certain selection of photos upon clicking a picture in another carousel.

    I have been able to get the sub carousels to show up, but just not in a carousel format, just made random static lists.

    The code I have below firefox says the showMe(n) is not defined, well actually it says that about the html code onclick="showMe(1)" which is placed in the img tag of the main carousel.




    Code:
    var currentUl = 1;
    function showMe(n) {
    	$("ul#gallery").click(function(){
    	$("#ex_"+currentUl).hide();
    	$("#ex_"+n).show(function() {
    		$("div#picture").show();
    		$("span#picture").show();
    	});
    currentUl = n;
    });
    }
    I have this code loaded into the
    $(document).ready(function(){

    Which I understand is crucial to getting this kind of thing to work.

    my link:

    http://royalvillicus.com/photo_site/photo.html

    I appreciate any assistance in the matter

  • #2
    Regular Coder
    Join Date
    Feb 2009
    Location
    Wheeling, IL
    Posts
    358
    Thanks
    5
    Thanked 62 Times in 60 Posts
    Try this:

    Code:
    	onclick="showMe('1')"
    Should solve the issue.

  • #3
    Regular Coder
    Join Date
    May 2008
    Posts
    446
    Thanks
    23
    Thanked 5 Times in 5 Posts
    Thanks for the suggestion, although that didnt seem to help.


    The odd thing is, I have used this code with other sites no problem that was mostly javascript. Could be a jquery issue I guess.

    Thanks a lot for all your help


  •  

    Posting Permissions

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