0

This came up immediately after upgrading to wordpress 3.6.

Upon clicking the modal "anchor" tag, an ajax event fires to refresh the content in the box.

It was working before, then ceased afterward. I noticed some small changes have been made to jQuery in the admin regarding plugins, but I'm not sure it affects my situation.

I guess the question is, why doesn't this event get recognized/fired.

Here is the modal example: http://codex.wordpress.org/ThickBox

Here is my link that fires it up:

<a href="#TB_inline?width=600&amp;height=550&amp;inlineId=ss-edit-image-box" data-id="6617" id="6617" title="Edit Individual Image Info" class="edit-image thickbox prettylink" style="display: inline;">» Edit 6617</a>

Then here's the function that it should fire based on link with class:

//get_image_ajax
$(document).on('click', '.edit-image', function (e) {

    e.preventDefault();

    var data = {
        action: 'ss_professional_ajax',
        security: '<?php echo $ajax_nonce; ?>',
        image_id: $(this).attr('id'),
    };

    $.post(ajaxurl, data, function (response) {
        $('#ss-edit-image-box-content').empty();
        $('#' + loading_icon).show();
        $('#ss-edit-image-box-content').append(response);
        $('#' + loading_icon).hide();
    });
    return false;
});

EDIT: The ajax itself / the function is not firing. The modal window does pop up. Its also worth noting that this is "live" content delivered by ajax.

  • Anyone? Any ideas? – user1915665 Aug 2 '13 at 17:32
  • 1) Does your JS console log show any specific error messages about the AJAX POST? 2) What's returned in response? 3) What's the HTML look like for #ss-edit-image-box? – Morgan Estes Aug 3 '13 at 4:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.