PDA

View Full Version : function undefined


surreal5335
03-06-2009, 07:37 PM
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.






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

Eldarrion
03-07-2009, 12:05 AM
Try this:


onclick="showMe('1')"


Should solve the issue.

surreal5335
03-07-2009, 02:20 AM
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