Question

I am using Cycle's pagerAnchorBuilder function to create custom pager links. However, there is already an element inside the pager container (and empty span) and I need to ensure Cycle inserts the generated li elements before the span, not after.

(I am using the span element for even spacing of menu elements within a container. I have tried appending the span after Cycle is called but that doesn't work, presumably because CSS is parsed before Javascript.)

HTML

<nav class="one">
<ul>
  >>  INSERT HERE <<
<span></span>
</ul>
</nav>

JS

pager:  'nav ul',
pagerEvent: 'mouseover',
pagerAnchorBuilder: function(idx, slide) {
return '<li><a href="#">'+ $(slide).attr('title') +'</a></li>';
}

Can anyone help? Thanks!

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top