I am returning a list of Users/Records that I follow in Chatter. Ultimately, what I want to do is display the list in a webpage and simply click on a User or Record and I will stop following them.
So I've returned the list and I figure if I remove the parent.id or set it to null and update the record, that should do the trick. I know it might not be perfect but I want to try it anyway.
<apex:repeat value='{!Admin}' var="f">
$('#admin').append(
$('<div>').append(
$('<span>').addClass('parent-span').append('<b>Parent Id: </b>' + '{!f.parentid}' + '</br></br>' )
)
)
</apex:repeat>
I need to pass the parentId from 'parent-span' into a function but I'm not really sure how to proceed. Would anyone have any suggestions?
Something like this perhaps?
var parentId;
$(".parent-span").click(function(){
parentId = $(this).attr(??);
alert(parentId)
});