Forum Discussion
NicoB
12 years agoLithium Alumni (Retired)
HI PerBonomi
I just spent a good hour trying to fix the same issue :)
Try replacing this:
$("#messageview .message-uid-${msgId}").find(".lia-message-author-rank").append("#custom-${msgId}");
with this:
$("#messageview .message-uid-${msgId}").find(".lia-message-author-rank").append($("#custom-${msgId}"));
You're basically passing a string to append while you should pass a jQuery object.
Nico
PerBonomi
12 years agoBoss
Hmm, it's still not moving, but I think your last comment has gotten me closer to figuring it out. Thanks for the help :)
- NicoB12 years agoLithium Alumni (Retired)
It's probably the selector which is not picking up the right element... unfortunately it's a trial and error exercise with DOM :)
Good luck!!
Nico
- PerBonomi12 years agoBoss
Got it! And I couldn't have done it without your help.
<#assign msgId = env.context.message.id /> <@delegate /> <div id="custom-${msgId}">your content here</div> <@liaAddScript> ;(function($) { LITHIUM.Loader.onLoad(function(){ $("#custom-${msgId}").prev().find(".lia-message-author-rank").append($("#custom-${msgId}")); }); })(LITHIUM.jQuery); </@liaAddScript>
Thank you thank you.