• pathuri

    (@pathuri)


    I’m getting the following JS error :
    Uncaught TypeError: undefined is not a function : (index):2952

    Line where JS error is occurring :
    —————————————————————
    //remove event handler previously attached to #bpfb_submit
    jq(“#bpfb_submit”).die( “click” );

    JS function :
    ———————————————–
    jq(document).ready( function() {

    form = jq(“#whats-new-form”);
    text = form.find(‘textarea[name=”whats-new”]’);

    //remove event handler previously attached to #bpfb_submit
    jq(“#bpfb_submit”).die( “click” );

    jq(document).delegate(“#bpfb_submit”, ‘click’, function (event) {

    event.preventDefault();
    var params = _bpfbActiveHandler.get();
    var group_id = jq(‘#whats-new-post-in’).length ?jq(‘#whats-new-post-in’).val() : 0;

    jq.post(ajaxurl, {
    “action”: “bpfb_update_activity_contents”,
    “data”: params,
    // add visibility level to the ajax post
    “visibility” : jq(“select#activity-privacy”).val(),
    “content”: text.val(),
    “group_id”: group_id
    }, function (data) {
    _bpfbActiveHandler.destroy();
    text.val(”);
    jq(‘#activity-stream’).prepend(data.activity);
    /**
    * Handle image scaling in previews.
    */
    jq(“.bpfb_final_link img”).each(function () {
    jq(this).width(jq(this).parents(‘div’).width());
    });

    //reset the privacy selection
    jq(“select#activity-privacy option[selected]”).prop(‘selected’, true).trigger(‘change’);

    jq(‘select.bp-ap-selectbox’).customStyle(‘2’);
    });
    });
    });
    —————————————————————–
    Any idea how to fix this?

    https://www.ads-software.com/plugins/buddypress-activity-plus/

Viewing 15 replies - 1 through 15 (of 15 total)
Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘JS error’ is closed to new replies.