Uncaught TypeError: $(...).prettyPhoto is not a function

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
FCazabon
Forum Members
Forum Members
Posts: 165
Joined: Fri Nov 07, 2008 5:28 pm

Uncaught TypeError: $(...).prettyPhoto is not a function

Post by FCazabon »

Hi,

I am using CMSMS 1.12 with the Gallery 2.0.2 module.

When I click on an image in a gallery it displays in is own web page and then I have to click on the browser's back button to go back to the list of photos in the gallery and click on another one. THis despite having set the template to PrettyPhoto which is supposed to display the photo and let me click next and previous buttons to go through all the photos in the gallery.

When I inspect the element I see the error:

Uncaught TypeError: $(...).prettyPhoto is not a function

I have this working in another site so I've tried comparing the source and don't understand why there is a difference.

Working Site:
http://pavitandt.org/index.php?mact=Gal ... 66&page=66

Code: Select all

	<div class="img">
			
		<a class="group" href="uploads/images/Gallery/Album1/DSC00718.JPG" data-title="On the computer" data-lightbox="cmsmsgallery12"><img src="uploads/images/Gallery/Album1//thumb_DSC00718.JPG" alt="On the computer" /></a>
		</div>
	<div class="img">
Problem site:
http://arrivealivett.com/index.php?mact ... 84&page=84

Code: Select all

	<div class="img">
	   <a class="group" href="uploads/images/Gallery/Art%20Essay/IMG_2743-3.jpg" title="" rel="prettyPhoto[21]"><img src="uploads/images/Gallery/Art%20Essay//thumb_IMG_2743-3.jpg" alt="IMG_2743-3.jpg" /></a>
		</div>
I do know I've used a different template in the working site, but that should not be a problem.

Any ideas what could be wrong here?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Uncaught TypeError: $(...).prettyPhoto is not a function

Post by velden »

jQuery library is included multiple times. Probably that causes the problem
FCazabon
Forum Members
Forum Members
Posts: 165
Joined: Fri Nov 07, 2008 5:28 pm

Re: Uncaught TypeError: $(...).prettyPhoto is not a function

Post by FCazabon »

velden wrote:jQuery library is included multiple times. Probably that causes the problem
Thanks, but it seems to be the same in the working page and all the jquery references are handled by the template and the module so I haven't added in any extra calls (that I am aware of) and don't want to mess with the template or module to remove any.

Any other ideas?

Later:

I switched from the PrettyPhoto template to the Lightbox template and it is working! So I guess there is some problem with that template.
Post Reply

Return to “Modules/Add-Ons”