Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Javascript error

Posted on 2014-04-16
5
Medium Priority
?
323 Views
Last Modified: 2014-04-29
I downloaded a script called Thumbnail gallery with PHP admin.  When I load it and go to the admin page, I get an error:

TypeError: $jDOPTG(...).attr(...) is undefined
      
var id = $jDOPTG(this).attr('id').split('-')[2];

The following, is the entire function:
function doptgGalleriesEvents(){// Init Gallery Events.
    $jDOPTG('li', '.column1', '.DOPTG-admin').click(function(){
        if (clearClick){
            var id = $jDOPTG(this).attr('id').split('-')[2];
            
            if (currGallery != id){
                currGallery = id;
                $jDOPTG('li', '.column1', '.DOPTG-admin').removeClass('item-selected');
                $jDOPTG(this).addClass('item-selected');
                doptgShowImages(id);
            }
        }
    });
}

Open in new window


Any clues on how to fix this?
0
Comment
Question by:rgranlund
  • 2
  • 2
5 Comments
 
LVL 22

Expert Comment

by:plusone3055
ID: 40003951
can you include the download link where you got it ?
0
 
LVL 7

Author Comment

by:rgranlund
ID: 40003975
0
 
LVL 22

Expert Comment

by:plusone3055
ID: 40003985
so this is something you purchased ?
0
 
LVL 7

Author Comment

by:rgranlund
ID: 40004014
The error seems to have disappeared!
0
 
LVL 60

Accepted Solution

by:
Julian Hansen earned 2000 total points
ID: 40004015
Make sure you are loading the JQuery library and then try adding this to the top of your script but after the JQuery script include

var $jDOPTG = jQuery.noConflict();

Open in new window

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

824 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