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 7768167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:51:05+00:00 2026-06-01T15:51:05+00:00

Im loading both a menu and a page content with the .load. First the

  • 0

Im loading both a menu and a page content with the .load.
First the menu should load and when click on one menu item it should load the url and that “content” in the “container”.

This works but something is wrong, because it messes up the loadFacebook function below so I need to change it.

$(document).ready(function() {
    loadPage();

});
function loadPage(url) {

    $('#guiden_menyn').load('manmade/guiden/guiden_menyn.html #content',
            hijackLinks);

    $('#container').load(url + ' #content', hijackLinks);

}
function hijackLinks() {
    $('#guiden_menyn a').click(function(e) {
        e.preventDefault();
        loadPage(e.target.href);

    });

}

And a link i the menu “guiden_menyn.html” looks like this:

<a  class="lank" href="manmade/guiden/tipsa.html">

function loadFacebook() {

    $('#container').load(
            'http://www.manmade.se/manmade/guiden/facebook_onweb.html',
            function() {
                FB.XFBML.parse();
            });
}

Maybe I need to set a onclick to run the function on the link instead of the “$(‘#guiden_menyn a’)….”?

How should it be, any suggestions appreciated, thanks!

  • 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-01T15:51:07+00:00Added an answer on June 1, 2026 at 3:51 pm

    Use a function like this
    Here is html

    <a  class="lank" href="manmade/guiden/tipsa.html">
    

    Give lank class to every hyperlink
    Then

    $('.lank').click(function(){
          var link = $(this).attr('href');
          loadPage(link );
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm loading, using the JQuery ajax() method, an external page with both html and
When loading a page for the first time (!IsPostback), I am creating a button
After loading a PHP template (using jQuery's load function), this simple script won't make
I am having some strange problems loading content from another XHTML page via jQuery.
I'm loading a page into an iframe. Both pages are on the same domain.
I have Main.fla and SkinA.fla. Both have MovieClip library item: MC_BrandLogo. I'm loading the
Try loading this normal .jpg file in Internet Explorer 6.0. I get an error
Error loading script occurs under FireFox 3 if I quickly click different links on
One of the tip given by both Google and Yahoo! to speed up webpages
I have a ExpandableListView in which i am loading custom layouts in both group

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.