This event is not firing. Can you help?
Hi Aeneas,
We are sorry, this is a bug. Collapse and Expand events don't work.
Here is a workaround.
Collapse: preApperyio("mobilecollapsblockName").on( "collapsiblecollapse", function( event, ui ) {
//your code here
} );/pre
Expand: preApperyio("mobilecollapsblockName").on( "collapsibleexpand", function( event, ui ) {
//your code here
} );/pre
Where mobilecollapsblockName is a name of collapsible block.
Thanks for that but where do I put this code? In the on expand event?
Hello Lucas!
You can find more information here: https://getsatisfaction.com/apperyio/...
Thanks for response. The event is now working but I want to reference a label within that collapsible that I expanded but am again getting all the results of all collapsible labels. I've tried...
alert($(this).parent().find("[name=lblMsgRead]").text());
alert($(this).find("[name=lblMsgRead]").text());
The event is passing UI to it - function( event, ui )
How do I use this to reference just the current lblMsgRead item?
Hi Aeneas.
Please use this code for your needs:
pre
Apperyio("mobilecollapsblockName").on( "collapsiblecollapse", function( event, ui ) {
var currentElement = jQuery(event.target);
alert(currentElement.find("[name=lblMsgRead]").text());
} );
/pre
Also if you want to understand why your code not worked please follow this document: http://javascript.info/tutorial/bubbl...
Regards.
Thanks for your help that works well. I am quite new to Java so will read through the tutorial.
Hi for some reason this has stopped working now. I have a collapsible (collapsemessagedetail ) inside another collapsible(collapseMessages ) that I want to trigger even on.
My breadcrumbs read as:
Main / panelMessages / collapseMessages / collapsmsgblockcontent / collapsemessagedetail
If I have add these 2 events
Apperyio("collapseMessages").on( "collapsibleexpand", function( event, ui ) {
alert('Expand1');
} );
Apperyio("collapsemessagedetail").on( "collapsibleexpand", function( event, ui ) {
alert('Expand2');
} );
Only the first event triggers when I click on parent and child so I'm always seeing "Expand1" in alert. How do I get other one to work?
Thanks,
Aeneas
Hi Aeneas
In this case you should use following code:
pre
//Note you should replace "mobilecollapsblock_25" with your first level collapsible.
Apperyio("mobilecollapsblock_25").bind( "collapsibleexpand", function( event, ui ) {
alert('Expand1');
event.stopPropagation();
} );
//Note you should replace "mobilecollapsblock_28" with your second level collapsible.
Apperyio("mobilecollapsblock_28").bind( "collapsibleexpand", function( event, ui ) {
alert('Expand2');
event.stopPropagation();
} );
/pre
Also please double check mobilecollapsible component names. I guess you have mistaken with these names.
Regards.
Hi Yuri,
Using your CurrentElement technique I was able to return the value of the label inside a collapsible however the same technique won't return the label of the collapsible header.
alert(currentElement.find("[name=lblMsgRead]").text());
Returns "true" - correct
alert(currentElement.find("[name=lblMsgHdr]").text());
Returns (blank) - should return "Message From Lucas"