var row = $('div[data-topic-id=6483]'); var btn = row.find('a i.show-latest-posts'); if(btn.attr('data-opened') == 'false') { btn.removeClass('fa fa-arrow-circle-down') .addClass('fa fa-times-circle') .addClass('hide-more') .attr('data-opened', true); row.find('.latest-topics') .removeClass('hidden') .html('
\n
\n