# Decorate topic list with jquery?

**URL:** <https://meta.discourse.org/t/decorate-topic-list-with-jquery/53931>\
**Category:** Development\
**Created:** [December 7, 2016, 5:09pm UTC](https://meta.discourse.org/t/decorate-topic-list-with-jquery/53931 "2016-12-07T17:09:55Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)\
**Post date:** [December 7, 2016, 10:37pm UTC](https://meta.discourse.org/t/decorate-topic-list-with-jquery/53931/6 "2016-12-07T22:37:02Z")

</div>

I reckon the best way to achieve what you’re trying to do is add a method that listens for the post created event on the server. See a similar method in my ratings plugin [here](https://github.com/angusmcleod/discourse-ratings/blob/master/plugin.rb#L113).

In this method you should

1. Parse the cooked html for what you need.

2. Use the parsed content to get your data.

3. Save the response to a custom field.

Then you’ll add a new method to the topic list item serializer that gets your saved data from the custom field.

Then you just need to render the serialized data in the topic list item using one of the plugin outlets.

I would avoid making an ajax request on the client if possible.

---

_[View the full topic](https://meta.discourse.org/t/decorate-topic-list-with-jquery/53931)._
