jQuery Cycle pagerAnchorBuilder Wordpress Modularity Theme -


the modularity wordpress theme includes "post slider" built around jquery cycle. uses pager display small number above sliders. love able change number post title.

the code in theme follows:

 $doc_ready_script .= ' 

jquery(function() {

   jquery("#slider-posts").cycle({        fx:      "scrollhorz",        timeout:  0,        prev:    "#prev",        next:    "#next",        pager:   "#slider-nav",  containerresize: 0    }); 

});';

i not jquery coder (as might able tell!) , thought simple adjustment code follows trick:

$doc_ready_script .= ' jquery(function() {

   jquery("#slider-posts").cycle({        fx:      "scrollhorz",        timeout:  0,        prev:    "#prev",        next:    "#next",        pager:   "#slider-nav",  containerresize: 0,  pageranchorbuilder: function(idx, slide) {                return '<li><a href="#">' + jquery(slide).children("h2").eq(0).text() + '</a></li>';       }    }); 

});';

however, error saying "parse error: syntax error, unexpected '>'".

so, realise have done daft!

can kind jquery guru point me in right direction please?

many in anticipation!

i needed exact same functionality on website. need build array first using .map() function. can loop through array in pageranchorbuilder function.

check out tutorial i've written. it'll show how working!


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -