SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2010
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jQuery [ refresh page ]

    Hey, fellows.

    My question is , if there's a possibility to keep data obtained by .append function after refreshing page.
    Normally all data appended is going to disappear after refresh.

    Example:

    Code JavaScript:
    $(function() {
       $("#example1").click(function() {
          $("<div id='in2'>Hello fellows :-)</div>")
          .hide()
          .insertAfter("#example1")
          .fadeIn(1000);
       });
     
    });

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,701
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by nydiann View Post
    Hey, fellows.

    My question is , if there's a possibility to keep data obtained by .append function after refreshing page.
    Normally all data appended is going to disappear after refresh.
    Only by storing it on the local computer in some manner. That can be achieved in a number of ways, from querystrings, to cookies, to local storage.

    As you're using jQuery, a plugin such as this local storage one might be the way to go.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •