Solved

Javascript error

Posted on 2014-04-16
5
312 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 56

Accepted Solution

by:
Julian Hansen earned 500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)

749 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