jquery - fancybox: title for next and prev item -


i need make navigation 'prev' , 'next' need title of them next it.



ex:

< prev | 'previous post title'                                     'next post title' | next >



i wasn't able find relevant post anywhere , hoping genius me out problem.

i've looked thumbnail helper pulls next , previous photo, i'm not savvy enough pull title code.(not sure direction right)

help!

you use fancybox tpl option customize navigation like

jquery(document).ready(function ($) {     $(".fancybox").fancybox({         tpl: {             next: '<a title="next" class="fancybox-nav fancybox-next" href="javascript:;"><span>next post title | next &gt;</span></a>',             prev: '<a title="previous" class="fancybox-nav fancybox-prev" href="javascript:;"><span>&lt; prev | previous post title</span></a>'         }     }); }); // ready 

then use custom css (after load fancybox css file) format next/prev items needed :

.fancybox-prev span, .fancybox-next span {     background-image: none; /* remove default arrows */     bottom: -30px;     color: #000 !important;     top: auto;     width: 100%; } 

see jsfiddle


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -