Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Javascript - Can I load certain html elements on click?

Options
  • 18-03-2014 7:41pm
    #1
    Registered Users 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 Posts: 6,501 ✭✭✭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 Posts: 6,150 ✭✭✭Talisman


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


Advertisement