jQuery(document).ready( function($) { var readmore = $('
Show more
').css('cursor', 'pointer'); var comments = $('#comments'); readmore.click(function(){ var body = $('.awedoor-post-body') if ( body.hasClass('opened') ) { body.removeClass('opened'); $(this)[0].innerHTML = 'Show more'; } else { body.addClass('opened'); $(this)[0].innerHTML = 'Show less'; } }) $('.awedoor-post-body').after(readmore) })