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

  • SEARCH
  • Home
  • 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 6563761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:53:13+00:00 2026-05-25T13:53:13+00:00

$(function(){ $(‘.update-mod-form’).bind(‘ajax:success’, function(evt, data, status, xhr){ data = $.parseJSON(data); console.log(data.success); console.log(data); if (data.success ==

  • 0
 $(function(){
   $('.update-mod-form').bind('ajax:success', function(evt, data, status, xhr){
       data = $.parseJSON(data); 
       console.log(data.success);
       console.log(data);
      if (data.success == true) {
           $('#page').html(data.html);
        }
        else {
        }
   });
 });

Do you see any JS bindings Best practices that could correct a bindings problem? This method works, once then After the data.html is added with the .html method, the method doesn’t work a second time.

The data.html, generates a class .update-mod-form, which is unbound How can I bind this new class?

I should also note that I have multiple occurrences of this class, is it possible to bind more than one element of a class to a method in this way?

  • 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-25T13:53:13+00:00Added an answer on May 25, 2026 at 1:53 pm

    If #update-mod-form is is inside #page, then after first ajax call, this form (and its bindings) is wiped out. You have to rebind it, or use live not bind.

    ps. you sure the event is ajax:success not ajaxSucces? And why are you using global event at all?

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

Sidebar

Related Questions

function contentDisp() { $.ajax({ url : a2.php, success : function (data) { $(#contentArea).html(data); }
function addFav(id){ $.ajax({ url: misc/favAdd.php, type: POST, data: { mode: 'ajax', user: id}, dataType:
function removeComment(bID) { $('#submitChangeComment').attr('disabled', true); $.ajax({ type: POST, url: misc/changeComment.php, data: { mode: 'del',
function simple_form($form_state) { $form['item'] = array('#type' => 'hidden', '#value' => 'some_value'); $form['#action'] = 'http://external-website.com/';
function json (url){ $.getJSON(url, function(data) { return data; }) } this function don't see
function blah(_x) { console.info(_x.toSource().match(/\/\/\s*@version\s+(.*)\s*\n/i)); } function foobar() { // ==UserScript== // @version 1.2.3.4 //
function Request(params) { // Stuff stuff stuff // And then $.ajax( { type: 'GET',
function lookupRemote(searchTerm) { var defaultReturnValue = 1010; var returnValue = defaultReturnValue; $.getJSON(remote, function(data) {
function uploadify() { $file = $this->input->post('filearray'); $data['json'] = json_decode($file); print_r($data); $name = $this->$json->{'file_name'}; echo
function updateimage(){ $(#fileimg).attr(src,image.jpg); $('#fileimg').fadeIn('slow'); } function updatefiles(){ $.get('files.php', function(data) { $('#files').html(data); $('#files').fadeIn('slow'); }); }

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.