﻿$(document).ready(function() { $(".testimoniallist li blockquote").each(function() { var element = $(this); var is_visible = false; var hideText = 'Show less'; var showText = 'Read More'; $(this).find("p:last").after("<a class=\"expand\" style=\"font-weight:bold\" href=\"#\">" + showText + "...</a>"); $(this).find("p:gt(0)").hide(); $(this).find("a.expand").click(function() { is_visible = !is_visible; $(this).text(((!is_visible) ? showText : hideText) + '...'); $(element).find("p:gt(0)").toggle(); return false }) }) });