Need help with div's opening main...

by TomVa
4 replies
  • WEB DESIGN
  • |
Hey wonder if anyone knows the best way to go about doing this, I am A Pretty good at designing responsive type websites and I have ran into a little problem and everything I have tried failed reason Im asking here..

Say i have a few top nav links home products about etc..
now say someone clicks on a products link I want that link to open in the
parent window in the middle of the div

the column are

1st 2nd 3rd

| | | and I want that link to open in the middle column say in a div like this

<div id="midContent"> link opens here</div>

can anyone help I DO NOT I REPEAT DO NOT WANT TO USE IFRAMES!!!!

Javascript Jq will work etc.. thanks
TOM
#div #main #opening
  • Profile picture of the author Andrew H
    Pretty easy to do with jquery. You'll probably want to add a loader splash to improve UX.

    Code:
    $('.menuitem').click(function(){
    
        $('#midContent').load('/your/link/here.html');
    
        // or if your using a menu with links use this below
        // $('#midContent').load( $(this).attr('href')  );
    
        // add this too so that it doesn't fire the link
        return false;
    });
    http://api.jquery.com/load/
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[8558393].message }}
    • Profile picture of the author TomVa
      Originally Posted by Andrew H View Post

      Pretty easy to do with jquery. You'll probably want to add a loader splash to improve UX.

      Code:
      $('.menuitem').click(function(){
       
          $('#midContent').load('/your/link/here.html');
          // or if your using a menu with links use this below
          // $('#midContent').load( $(this).attr('href')  );
      });
      .load() | jQuery API Documentation
      man I had to change my email and when I did I was locked out of here sorry ok, how the heck would I do this with that,
      Like I said I am pretty good at doing this but feel so stupid right now because I have spent 3 days on this tried everything and cant fig this out Can you break it down for dummies like myself lol
      Signature

      Do you need stable WEBHOSTING? https://hpthost.com HEY folks, for a limited time get the first month of service For only $0.01 That's 1 cents. At checkout use coupon code 1cent. This is only for web hosting, and only applies to the monthly services.

      {{ DiscussionBoard.errors[8560070].message }}
  • Profile picture of the author Andrew H
    Post the link to your page or PM me it and I will take a look.
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[8560410].message }}
    • Profile picture of the author TomVa
      Originally Posted by Andrew H View Post

      Post the link to your page or PM me it and I will take a look.
      Hey thanks but it is not online yet, all I need to do is fig out how to make my link in the parent page open the child link into the middle of the parent page ie.

      click on ABOUT it would open www.mysite.com/about.html
      but I want it to open about.html inside the middle div/content area of my website.
      Signature

      Do you need stable WEBHOSTING? https://hpthost.com HEY folks, for a limited time get the first month of service For only $0.01 That's 1 cents. At checkout use coupon code 1cent. This is only for web hosting, and only applies to the monthly services.

      {{ DiscussionBoard.errors[8562612].message }}

Trending Topics