Jump to content

Div Content Refresh


jomagi

Recommended Posts

Hi there!

 

I'm working in a new site and I've a problem with refreshing content.

I using CSS, HTML and little Javascript.

 

I have 5 divs and only one appear, and the div change to another when a button is clicked, and all work fine, I travel true the five div's without problem.

 

In each div there was a table and when the user interact with it, the user make appear hidden rows with content, that is the gold and work fine too.

 

My problem is when I toggle to one off the others divs, and return to the first, the div appear like the user left and I want that the div look like the first time he access that div.

 

How can I make the div to refresh to the original content view?

 

Can you help me?

 

Thanks to all

Link to comment
Share on other sites

JavaScript only allows you to refresh a form in whole, similar to a input type="reset", using the .reset() method on a form object. If you want to reset only portions of the form, you would be better (for a more semantic approach) using <fieldset>s instead of <div>s, and manually looping through all inputs within the <fieldset> and clearing their values.

 

Are you using jQuery at all? jQuery makes this kind of thing a simple one-liner, where-as the pure standard JavaScript approach would be a little more complex.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.