Changeset 10379
- Timestamp:
- 11/25/2015 09:27:19 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-templates/bp-legacy/js/buddypress.js
r10378 r10379 946 946 el, 947 947 css_id, object, search_terms, pagination_id, template, 948 url_parameters,page_number,948 page_number, 949 949 $gm_search, 950 950 caller; … … 971 971 template = null; 972 972 973 url_parameters = target.attr('href').split( '&' );974 // The page number is the first parameter.975 page_number = url_parameters[0].split( '=' );976 page_number = page_number[1];977 978 973 // Search terms 979 974 if ( jq('div.dir-search input').length ) { … … 985 980 search_terms = search_terms.val(); 986 981 } 982 } 983 984 // Page number 985 if ( jq(target).hasClass('next') || jq(target).hasClass('prev') ) { 986 page_number = jq('.pagination span.current').html(); 987 } else { 988 page_number = jq(target).html(); 989 } 990 991 // Remove any non-numeric characters from page number text (commas, etc.) 992 page_number = Number( page_number.replace(/\D/g,'') ); 993 994 if ( jq(target).hasClass('next') ) { 995 page_number++; 996 } else if ( jq(target).hasClass('prev') ) { 997 page_number--; 987 998 } 988 999
Note: See TracChangeset
for help on using the changeset viewer.