• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 639
  • Last Modified:

Load div on click of button

Hi,


I have a form like on image below, 30 columns, it takes some time to load and it's definitely too much time, and a user can use just 3 or 4 only, so there's no need to load all the columns.
formI want to show just 4 columns by default and display extra column if you want, on click of the button I think, but could be different way.
Important! I don't want to just show and hide, but actually load first 4 only first and on click load another one. So I need an effect like so:

4 columns displayed and button 'add new', when button clicked - new column appears, one click of 'add new' button and one column appears.

I think it's a jQuery job, but can't find anything like that on net.


Please help.
0
Zado
Asked:
Zado
  • 2
  • 2
1 Solution
 
darren-w-Commented:
Try using use .clone() http://api.jquery.com/clone/.

Darren
0
 
ZadoAuthor Commented:
0
 
ZadoAuthor Commented:
Thanks for your help Darren
0
 
darren-w-Commented:
Clone is the standard way to copy content in jquery, load is a Ajax method that is valid but inefficient, I feel I should get some credit
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now