Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6793177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:04:10+00:00 2026-05-26T18:04:10+00:00

I have a jquery powered voting system, and the items on other pages are

  • 0

I have a jquery powered voting system, and the items on other pages are loaded via ajax, but on ajax-loaded contents the jquery voting needs the page to be refreshed for the vote to be processed.

http://ohmygosh.vr.lt/

I think the problem is within the actions in this file (?) But i’m not really sure. I don’t have any code to start since I don’t even know where to start. How do I fix this Problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:04:11+00:00Added an answer on May 26, 2026 at 6:04 pm

    Seems that you are using a SmartAjax to load the page content. What SmartAjax does is that it changes the page url (using pushState or hash), loads data and REPLACES the content of #posts div with the loaded content.

    The problem is that you are listening click events from DOM elements which are later deleted and replaced with new DOM elements. Thus, the click events from the ajax loaded content are not listened. live() doesn’t help in this case.

    To fix this, you have at least these two options:

    1) Use jQuery’s delegate() to attach the handler and use #posts div as the root element, since it remains after the new content is loaded.

    Something like this should work:

    $('#posts').delegate(':input', 'click', function() {
        var value = $(this).val();
        alert('You have clicked thumbs up/down, value: ' + value);
        return false;
    });
    

    2) Add click listener to the loaded items after data loading is completed.

    Notice: Starting jQuery 1.7 you should use on() instead of delegate()

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have put together an ajax powered chat/social network with jquery, PHP - but
I have a PHP page powered by jQuery. A singel page has four steps,
Hello Guys! See I have been creating a code powered with ajax but it
I have jQuery ajax requesting a page that returns html with <script> tags inside
I have jQuery Ajax request that sends data to a PHP page that then
I have jquery ui sortables working fine but my sortable elements have other interactive
I have an interactive web application powered by jQuery where users can manipulate visual
I have jquery validation code which is working fine in ff but the same
I'm struggling to find the right terminology here, but if you have jQuery object...
I have an issue retrieving ajax data using jquery 1.3.2 / 1.4.2: It works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.