我需要获取newt / before元素的href
来执行此操作:
< -a href =“$ url-of-next-or-before-element” title =“$ title-of-next-or-before-element”>< -button title =“%title%” type =“button”class =“mfp-arrow mfp-arrow-%dir%”> < - /按钮>< - / A>
原始代码是:
$.magnificPopup.registerModule('gallery', {
options: {
enabled: false,
arrowMarkup: '<-button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></-button>',
preload: [0,2],
navigateByImgClick: true,
arrows: true,
tPrev: 'Previous (Left arrow key)',
tNext: 'Next (Right arrow key)',
tCounter: '%curr% of %total%' },
我该怎么做?