You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However when I do so, the "prev" and "next" link are broken. After I checked the source code I think I got the reason here:
functionpaginationClickHandler(evt){varlinks,new_current_page=$(evt.target).data('page_id'),// In this line breaks!continuePropagation=selectPage(new_current_page);if(!continuePropagation){evt.stopPropagation();}returncontinuePropagation;}
Since evt.target would get the DOM element directly listening the event so it points to the <i> element which I inserted before, thus causing the page_id unavailable anymore.
My suggestion is to change evt.target to evt.currentTarget, which is always the DOM element which the event attached to.
I would like to have a PR if needed.
Thank you!
The text was updated successfully, but these errors were encountered:
Hi Birke! First of all thank you for your great pagination plugin!
I found an issue which could be a problem if one (like me) wants to customize the pagination appearance.
I passed these options when calling pagination, because I want use "<" and ">" to indicate "prev" and "next":
However when I do so, the "prev" and "next" link are broken. After I checked the source code I think I got the reason here:
Since
evt.target
would get the DOM element directly listening the event so it points to the<i>
element which I inserted before, thus causing thepage_id
unavailable anymore.My suggestion is to change
evt.target
toevt.currentTarget
, which is always the DOM element which the event attached to.I would like to have a PR if needed.
Thank you!
The text was updated successfully, but these errors were encountered: