Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Organic Tabs, AJAX, and WordPress

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #31359
    Alekhen
    Participant

    I ran into a problem while coding my site’s new WP theme. So, let me explain the situation and see if anyone can help me.

    http://hazard-media.com

    My site is divided into a handful of major pages each with a link in the top navigation. On each major page, the links to it’s subpages are dynamically populated as tabs in the grey title section. Right now if you click one of these subpage tabs the browser will reload and take you to that specific page (no surprise). However, I don’t want the page to reload. I want the subpage content to AJAX into the main content area below like in these examples:

    https://css-tricks.com/video-screencasts/81-ajaxing-a-wordpress-theme/
    http://themeclubhouse.digwp.com/ = All AJAX Theme

    The issues i’ve had with simply copying the code from the tutorials is that the javascript targets every link. I tried tinkering with it and was able to get it to target just the subpage tabs. However, it was really buggy and didn’t quite work out. I figure that the solution shouldn’t be too complicated. The code for these organic tabs seems quite straight forward and may provide a solution to my problem:

    https://css-tricks.com/organic-tabs/

    If anyone can think up a way to get my site to work how I want it or point me in the right direction I would be very appreciative.
    -Thanks

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.