Hello..
I have a template which has DIV's in it which are populated by a feed.
Items such as a DisasterID and the logged in user are used for the feed to display messages to the user for that particular disaster. Multiple disasters (and the particular users messages) can be displayed within this template. This works great.
My question is this; I'd like to hide the div's be default. Yet if the feed returns information, I'd like the div unhidden and it's information within displayed.
What would I do to accomplish this?
Thanks..
<div id="RRMessageDIV_[[DisasterID]]" c-l-a-s-s="RRMessages" style="display:none;">
<hr c-l-a-s-s="style-two">
<span c-l-a-s-s="rr_id" style="display:none;">[[disasterID]]</span>
<span c-l-a-s-s="user_name" style="display:none;">[[User:DisplayName]]</span>
</div>
<xmod:jQueryReady>
$.each($('.RRMessages'), function(index, value) {
var RRID = parseInt($(this).find('.rr_id').text());
var U-s-e-r = $(this).find('.user_name').text();
$.ajax({
url: '/DesktopModules/XModPro/Feed.aspx?pid=' + _portalId + '&xfd=Feed_HomePageReplyRequiredMessage',
type: "POST",
dataType: "html",
data: {
"DisasterID" : RRID,
"UserName" : U-s-e-r
},
success: function(data) {
// If information is returned; display div and the information.
// Otherwise keep hidden
// $('#RRMessageDIV_'+RRID). // ???????? - Turn off display:none
$('#RRMessageDIV_'+RRID).html(data);
}
});
});
</xmod:jQueryReady>