Skip to:
Content

BuddyPress.org

Changeset 7610


Ignore:
Timestamp:
11/29/2013 06:59:00 PM (6 years ago)
Author:
boonebgorges
Message:

Use delegation for activity stream Read More links

This ensures that dynamically added items (as when loading more items on a
page via AJAX) will register click events.

Fixes #4782

Props sbrajesh, burakali

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-templates/bp-legacy/js/buddypress.js

    r7470 r7610  
    355355
    356356    // Activity "Read More" links
    357     jq('.activity-read-more a').on('click', function(event) {
     357    jq('div.activity').on('click', '.activity-read-more a', function(event) {
    358358        var target = jq(event.target);
    359359        var link_id = target.parent().attr('id').split('-');
  • trunk/bp-themes/bp-default/_inc/global.js

    r7470 r7610  
    350350
    351351    // Activity "Read More" links
    352     jq('.activity-read-more a').on('click', function(event) {
     352    jq('div.activity').on('click', '.activity-read-more a', function(event) {
    353353        var target = jq(event.target);
    354354        var link_id = target.parent().attr('id').split('-');
Note: See TracChangeset for help on using the changeset viewer.