diff --git a/PHP and jQuery - Reduce Long String to Preview Length and Reveal Full Text OnClick.md b/PHP and jQuery - Reduce Long String to Preview Length and Reveal Full Text OnClick.md index b07a199..bf4ea16 100644 --- a/PHP and jQuery - Reduce Long String to Preview Length and Reveal Full Text OnClick.md +++ b/PHP and jQuery - Reduce Long String to Preview Length and Reveal Full Text OnClick.md @@ -1,4 +1,5 @@ ```php +/*PHP*/ static function ReduceStringForPreview($text,$size=100) { define($reduced,''); @@ -18,6 +19,7 @@ return $text; ``` ```js +/*jQuery*/ $(".preview_releaser").click(function(){ $(this).children('span').toggle('fast',function(){ if($(this).css('display') == 'inline-block'){