Infinity Listitem want to clear

This forum contains topics that were moved from Get Satisfaction
Amirul Momenin
Posts: 0
Joined: Tue Apr 08, 2014 3:42 am

Infinity Listitem want to clear

Post by Amirul Momenin »

Infinity Listitem is working fine.
Now I need to clear the listitem component and need to set search result.
How will i clear this?

Code: Select all

 $('[name="infinite_list"]').html(); 
 Apperyio("infinite_list").empty(); 

I am trying by this . this dont work

Image

Amirul Momenin
Posts: 0
Joined: Tue Apr 08, 2014 3:42 am

Infinity Listitem want to clear

Post by Amirul Momenin »

pls response this problem

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Infinity Listitem want to clear

Post by Serhii Kulibaba »

Hello Amirul,

Please set an ampty string to it's HTML layout: preApperyio("infinite_list").html(""); /pre

Amirul Momenin
Posts: 0
Joined: Tue Apr 08, 2014 3:42 am

Infinity Listitem want to clear

Post by Amirul Momenin »

No output blank but data is exists

Amirul Momenin
Posts: 0
Joined: Tue Apr 08, 2014 3:42 am

Infinity Listitem want to clear

Post by Amirul Momenin »

Amirul Momenin
Posts: 0
Joined: Tue Apr 08, 2014 3:42 am

Infinity Listitem want to clear

Post by Amirul Momenin »

function search_by_type(listitem)
{

Code: Select all

_idx = $(listitem).attr('_idx'); 
disid = "mobilelabel_type"+_idx;    
type_name = $("[dsid="+disid+"]").html(); 

_idx = $(listitem).attr('_idx'); 
 disid = "mobilelabel_type_id"+_idx;    
id = $("[dsid="+disid+"]").html(); 

//search option 
var dataStr = {}; 
dataStr['type_id'] = id; 
//saerchPara = {'search_type':'favorite_group','search_key_json':JSON.stringify(dataStr)}; 
saerchPara = {'search_type':'type_group','search_key_json':type_name}; 
Apperyio.storage.searchPara.set(saerchPara); 

 //$('[name="infinite_list"]').empty(); 
  Apperyio("infinite_list").html("");  

 //Here you can set the needed "limit". Currently it's set to 12. 
 var infiniteList = {limit: "10", skip: "0", noMoreItems: undefined}; 
 Apperyio.storage.dogsInfinite.set(infiniteList); 

 infiniteList = Apperyio.storage.dogsInfinite.get(); 
 if(infiniteList.noMoreItems == "true") 
    return;    

 infiniteList.skip = parseInt(infiniteList.skip) + parseInt(infiniteList.limit) + ""; 

  Apperyio.storage.dogsInfinite.set(infiniteList); 
  dogsListInfinite.execute();//{async:false} 

  Apperyio("mobilebutton_clr").show(); 

}

Amirul Momenin
Posts: 0
Joined: Tue Apr 08, 2014 3:42 am

Infinity Listitem want to clear

Post by Amirul Momenin »

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Infinity Listitem want to clear

Post by Yurii Orishchuk »

Hi Amirul,

Thank you for your details about this problem.

You have c15r error cause of you deleted template item.

Here is a code to delete all items without template item:

self.dogsListItems = Apperyio("infinite_list").find("li:not([data-appery-tpl])");

self.dogsListItems.detach();

Regards.

Post Reply