Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Javascript - Can I load certain html elements on click?

  • 18-03-2014 06:41PM
    #1
    Registered Users, Registered Users 2 Posts: 2,985 ✭✭✭


    As the title says, can I load particular elements on click?

    I'm working on a Wordpress site where one of the post types has up to 6 custom fields for additional content. The content in these fields can be quite slow (vimeo videos etc).

    Right now it works off what is essentially a simple tabbed layout with a menu on the right hand side which alternates the css display property using jQuery. I think this works fine, but the sites owner would prefer if the tabs didn't all load at once - ie:they would load as a user selects them.

    Is this possible? Would I need AJAX or something?

    For now at least I'd rather not have to go breaking the posts up into individual posts/pages if it can be helped.

    Thanks in advance.


Comments

  • Registered Users, Registered Users 2 Posts: 6,682 ✭✭✭daymobrew


    Look for a plugin that only displays content as needed.
    There are probably numerous ones that only load images as needed and the concept could be applied to other content.


  • Registered Users, Registered Users 2 Posts: 7,208 ✭✭✭Talisman


    Have a look at the WP UI plugin, it uses the jQuery UI library. WP UI components demo


Advertisement