CListView - incorrect element updating (on paginate)

jquery.yiilistview.js:

replace:


88:  					$('#'+this).html($(data).find('#'+this));

to:


88:  					$('#'+this).replaceWith($(data).wrap('<span>').parent().find('#'+this+':first'));

.replaceWith(…) - because after each update operation new element (with ID) inserted in element with original ID

.wrap(’<span>’).parent().find(…) - to find first element with given id (try to:


$('<div id="yw0">..</div>').find('#yw0').length // result = 0 - mistake!

with .wrap(’<span>’).parent().find(…) all works fine!)

Hi vamp - You have right - it’s a bug, but solution is more simply:

replace:


88:                                     $('#'+this).html($(data).find('#'+this));

to:


88:                                     $('#'+this).html($(data).find('#'+this+' > *'));

Regards!

first of all:

$(’<div id=“test”>asd</div>’).find(’#test > *’); - not works correctly :)

second - $(’#’+this).find(’#’+this+’ > *’) - doesn’t find text nodes! :rolleyes:

Hmmm… You have right.

But in blog works good, becouse any text is inside html’s tags.

Is there a ticket for it?