Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 496365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T05:40:46+00:00 2026-05-13T05:40:46+00:00

Not really much of a JS man – so can anyone explain why this

  • 0

Not really much of a JS man – so can anyone explain why this isn’t working? I want to call a predefined function in one script from my simple AJAX script – I just want it to call the qtip functionality upon the contents of the div brought into the page via AJAX.

Thanks,
H

SCript 1 – AJAX loader

       if(myHttpRequest.readyState==4)
            data.innerHTML = myHttpRequest.responseText;
                qtip_me('.div_to_act_on');
  }

Script 2 – main JQuery script

$(document).ready(function() {

    function qtip_me(a) {
        $(a).each(function() {
           $(this).qtip({ 
               content: {'showme'},
                position: {corner: {tooltip: 'bottomLeft', target: 'topRight'}},
                style: { 
                      width: 300,
                      padding: 5,
                      background: '#A2D959',
                      color: 'black',
                      textAlign: 'center',
                      border: {
                         width: 7,
                         radius: 5,
                         color: '#A2D959'
                      },
                      tip: 'bottomLeft',
                      name: 'dark' // Inherit the rest of the attributes from the preset dark style
                }           
            }); 
        });
    };
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T05:40:46+00:00Added an answer on May 13, 2026 at 5:40 am

    It might be that the function defined like that is not in scope.
    Try defining the function like so:

    qtip_me = function(a) {}
    

    This way it will be in scope.

    Or as the other answers say, don’t define the function inside the document ready.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not really getting the point of the map function. Can anyone explain with examples
I'm not really sure what else I can do with this. Here's a function
My problem is not really a problem, but I want to make this code
(Not really a programming question, sorry) I'm working on benchmarking various filesystems (most importantly:
The title may not really explain what I'm really trying to get at, couldn't
So i'm not really sure why this is happening but I'm running through some
I'm not really sure how to google this one . I would like to
This is a question not really about programming (is not specific to any language
I don't know much about Javascript, and this function I wrote doesn't seem to
My question does not really have much to do with sqlalchemy but rather with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.