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

  • SEARCH
  • Home
  • 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 7799045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:10:56+00:00 2026-06-02T00:10:56+00:00

index.html <link href=Styles/bootstrap.css rel=stylesheet /> <script data-main=Scripts/app src=Scripts/require.js></script> <a class=btn0>button 0</a> <div class=target></div> app.js

  • 0

index.html

<link href="Styles/bootstrap.css" rel="stylesheet" />
<script data-main="Scripts/app" src="Scripts/require.js"></script>

<a class="btn0">button 0</a>
<div class="target"></div>

app.js

require({
    paths : {
        jQuery : 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min',
        tooltip : 'bootstrap-tooltip'
    }
});

require([ 'jQuery' ], function() {
    require(['tooltip' ], function() {
        $(".btn0").click(function() {
            $(".target").load('btn0.html');
        });

        $('[rel=tooltip]').tooltip();
    });
});

btn0.html

 Wouldn't it be nice to see a Tooltip <a href="#" rel="tooltip" title="Oh yeah!">here</a>?

In this situation, the tooltip doesn’t work. Only works if i cut $('[rel=tooltip]').tooltip(); and paste in btn0.html like:

<script>
$('[rel=tooltip]').tooltip();
</script>

My question is. How organize the javascript code that is needed in btn0.html? It is possible put the JS content of btn0.html in app.js?

  • 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-06-02T00:10:57+00:00Added an answer on June 2, 2026 at 12:10 am

    You have to call tooltip() function when btn0.html is loaded.
    Element with rel="tooltip" does not exist when inicializing that page.

    require([ 'jQuery' ], function() {
      require(['tooltip' ], function() {
        $(".btn0").click(function() {
          $(".target").load('btn0.html', function ()
          {
            $('[rel=tooltip]').tooltip();
          })
        });
      });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<!DOCTYPE html> <html> <head> <link rel=stylesheet type=text/css href=styles/common.css> <script src=http://code.jquery.com/jquery-latest.min.js></script> <script type='text/javascript'> $(function() {
From the following HTML snippet: <link rel=index href=/index.php /> <link rel=contents href=/getdata.php /> <link
I have installed android sdk from this link http://developer.android.com/sdk/index.html.(installer_r18-windows .... android app is working
I have index.php like this: <script type=text/javascript src=jquery-1.4.2.js></script> <script type=text/javascript src=ajax.js></script> <a href='one.php' class='ajax'>One</a>
in my code for index.html I use jQuery and have a link with id
I have an index.html and global.css files. When I open these files at Coda,
Inside my index.html.erb <script type= text/javascript> var msg = Hello World ; </script> i
I have sample site: /index.html /appcache.manifest /style.css /test.js index.html: <!DOCTYPE HTML> <html manifest=appcache.manifest> <head>
My index.html page for my project needs some Ruby code so I need to
In running this on index.html, I get the following error: Uncaught SyntaxError: Unexpected token

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.