#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2013
    Posts
    3
    Rep Power
    0

    Nav Opening in Div


    Question for you guys...

    In my navigation, I want to be able to click on a link, and have it open in my content div without going to a whole new page. I know it's possible with JavaScript, I just don't know how to do it, and was just wondering if you guys could assist/point me in the right direction.

    Thanks,
    Bobby
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2013
    Location
    Saint-Petersburg, Russia
    Posts
    236
    Rep Power
    28
    User jQuery to simplify yourself writing ajax requests.

    To the link which should be clicked add "onclick" pointing to your javascript function.

    Here perform the $.ajax call or simply "get" to fetch your data.

    Then insert your data into target div.

    Here is even shortcut function:

    http://api.jquery.com/load/

    Scroll this page down for examples.
    CodeAbbey - programming problems for novice coders

IMN logo majestic logo threadwatch logo seochat tools logo