Update 'PHP and jQuery - Reduce Long String to Preview Length and Reveal Full Text OnClick.md'

This commit is contained in:
ben 2023-06-15 12:39:17 +00:00
parent 97d3baa4b7
commit 35be5d7968
1 changed files with 2 additions and 0 deletions

View File

@ -1,4 +1,5 @@
```php ```php
/*PHP*/
static function ReduceStringForPreview($text,$size=100) static function ReduceStringForPreview($text,$size=100)
{ {
define($reduced,''); define($reduced,'');
@ -18,6 +19,7 @@ return $text;
``` ```
```js ```js
/*jQuery*/
$(".preview_releaser").click(function(){ $(".preview_releaser").click(function(){
$(this).children('span').toggle('fast',function(){ $(this).children('span').toggle('fast',function(){
if($(this).css('display') == 'inline-block'){ if($(this).css('display') == 'inline-block'){