the source example is kind of this
// block with caption
var caption_block = "<div class='caption-block'><h1>"+ options.title + "</h1><div class='pages'><a href='/' id='left_pg'></a><div id='counter'>"+ (i+1)+'/'+(elms+1)+"</div><a href='/' id='right_pg'></a></div></div>";
// put the elemnt with caption into the DOM
$('ul.slider').before(caption_block);
// by click in #counter TEST
$('a').bind('click',function(){
$('#slider').find('#counter').text(" TEST ");
});
Unluck, but it’s don’t do anything at all.
The script can’t find a div#counter. How to get it?
the html looks like
<div id="slider"><ul class="slider" /></div>
The way you’re using it,
beforeis addingul.slideras a sibling to the caption block containingdiv#counter. You could select for slider by checking their mutual parent for it: