Skip to:
Content

BuddyPress.org

Changeset 6665


Ignore:
Timestamp:
12/25/2012 09:42:24 AM (11 years ago)
Author:
johnjamesjacoby
Message:

Allow item-list-tabs spans to trigger ajax requests when clicked. Props magnus78. Fixes #4688.

Location:
trunk
Files:
2 edited

Legend:

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

    r6663 r6665  
    636636            return;
    637637
    638         var target = jq(event.target).parent();
    639 
    640         if ( 'LI' == event.target.parentNode.nodeName && !target.hasClass('last') ) {
     638        var targetElem = ( event.target.nodeName == 'SPAN' ) ? event.target.parentNode : event.target;
     639        var target     = jq( targetElem ).parent();
     640        console.log( target[0].nodeName );
     641        if ( 'LI' == target[0].nodeName && !target.hasClass( 'last' ) ) {
    641642            var css_id = target.attr('id').split( '-' );
    642643            var object = css_id[0];
  • trunk/bp-themes/bp-default/_inc/global.js

    r6663 r6665  
    627627            return;
    628628
    629         var target = jq(event.target).parent();
    630 
    631         if ( 'LI' == event.target.parentNode.nodeName && !target.hasClass('last') ) {
     629        var targetElem = ( event.target.nodeName == 'SPAN' ) ? event.target.parentNode : event.target;
     630        var target     = jq( targetElem ).parent();
     631        if ( 'LI' == target[0].nodeName && !target.hasClass('last') ) {
    632632            var css_id = target.attr('id').split( '-' );
    633633            var object = css_id[0];
Note: See TracChangeset for help on using the changeset viewer.