Solved

Colorbox Jquery issue

Posted on 2013-12-02
4
260 Views
Last Modified: 2013-12-02
http://www.drmoutran.com/gallery.php

if i go to xxx and click on the image colorbox loads normally

but if I go to head > nose job > and click on any image 2 color boxes load on top of each other

Its basically the same function loading content via ajax
gallery.php
getProc.php
0
Comment
Question by:zahimezher
  • 2
  • 2
4 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39690569
Well at the very least the duplicate ids need to be fixed.  I think if you validate the code and fix the errors you might not have the problem, and if you do it will the code will at least be valid and predicable.

Cd&
0
 
LVL 1

Author Comment

by:zahimezher
ID: 39690897
I added letters before the ids to avoid conflict with the menu ids.
Im finally loading the correct set of images now on every click, but I still end up with 2 colorboxes opened.
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 39691015
Okay it looks like there might be some compatibility issues.  You are using jquery 1.7.1 which is pretty old, and in the console it is throwing warning about depreciated functions.

you might want to download the latest jquery library (1.10.2) here:
http://blog.jquery.com/2013/07/03/jquery-1-10-2-and-2-0-3-released/

Then make sure that the other jquery files are also the latest versions.  One of the problems with using technology that does not have a formal standard is that backward and forward compatibility and interoperability are unreliable.

I think the main problem may be with the preventDefault() function which is causing warning in the console.


Cd&
0
 
LVL 1

Author Closing Comment

by:zahimezher
ID: 39691781
;) Thanks allot that was great help and resolved my issue.

Have a mega nice day COBOLdinosaur
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now