hello
I have a ul:
<ul data-role="listview" id="video-items">
</ul>
and append items with a ajax call to the list
$('#videolink').click(function(){
$.get(host+'m/videos',function(data){
$('#video-items').append(data);
$('#video-items').listview('refresh');
});
});
that works great
but now the problem:
the appended li have the next url
echo '<div data-role="button"><a href="videos/2" class="more_items">More Videos</a></div>';
so when you click the link it will load more li and append it to the ul
I use this command:
$('.more_items').live('click',function(){
var thisitem = $(this);
$.get(host+'m/'+thisitem.attr('href'),function(data){
$('#video-items').append(data);
$('#video-items').listview('refresh');
thisitem.remove();
});
})
the problem is that JQM load the whole site..and seems to skip the
$('.more_items').live('click',function(){}
data-ajax="false" or rel="external" is not usable here because it appends li like facebook style (you stay on the same page)
how can i fix this except form using id's instead of a tags ?