Enfiled Riders
Posts: 0
Joined: Fri Jun 05, 2015 6:07 am

How to read all the label values in a mobilecollapsblock

I have a mobilecollapsblock component which has a label inside each mobilecollapscontent.

How can I read all the label text values?

Thanks,

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

How to read all the label values in a mobilecollapsblock

Hello Enfiled,

Please use this JS code for collapsibleblock "mobilecollapsblock":

var labes = Apperyio("mobilecollapsblock").find('[data-role="appery_label"]').text();

Enfiled Riders
Posts: 0
Joined: Fri Jun 05, 2015 6:07 am

How to read all the label values in a mobilecollapsblock

This code just shows me the first item.
How do I iterate to show all the labels?

Enfiled Riders
Posts: 0
Joined: Fri Jun 05, 2015 6:07 am

How to read all the label values in a mobilecollapsblock

Hello the issue is still not solved!

How do i iterate between the collapsible list labels?

Thanks,

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

How to read all the label values in a mobilecollapsblock

Hi Enfiled,

Here is how you can implement such logic:

pre

var collapsibles = jQuery('[name="mobilecollapsblock"]');

var allText = "";

for(var i = 0; i < collapsibles&#46;length; i++){
var currentText = jQuery(collapsibles)&#46;find('[name="labelName"]')&#46;text();

Code: Select all

  allText += currentText + " "; 

};

console&#46;log("allText = " + allText);

/pre

Regards.

Return to “Issues”