Support » Plugins » Hacks » Expand Post by Click with jQuery/AJAX

  • Hello there,

    after trying and googling for hours and hours … I’m turning to you to get (hopefully) solution ideas about my issue.

    I’m working on an AJAX Blog Page, where the user sees at first only the excerpts of the posts. By Clicking on one of the divs, the excerpt should be replaced by the full text.

    Currently I’m fetching the full posts, with the following code-line:

    $j(newsObject).load($j(newsObject).attr('name') + ' .entry-wrapper', hideLoader());
    I’ve saved the permalink in the name attribute. Entry-Wrapper encases only the text of the post without comments (this function should be implemented later).

    Furthermore I’m saving the excerpt of the clicked div in an javascript variable. But with this handling, I’m facing a big problem with fast users.
    If a User is clicking two objects in a rapid succession, the javascript varibale will be overwritten and not all the divs will get their excerpt back. This destroys the design, because the full text (the one which was clicked first) is above the other divs.

    So my first question is, if there is any possibility to get excerpts and full posts with a good jQuery request? And if there is no way, how else could I solve this issue?

    Thanks a lot for your help!


  • The topic ‘Expand Post by Click with jQuery/AJAX’ is closed to new replies.