I have created a views with trimmed fields and displaying more button to show the full content.I want to do something like collapse text ie.,when i click on more button it has to expand and show the full text.Any help will be much appreciated on how to do this.Thanks in advance.
This will require some custom theming to accomplish:
There's a contributed module that does this, Readmore. The other answers explain how to set this up yourself, but that's no longer necessary.
I've adding feature request to have this functionality added to Drupal Core. See Allow for expandable text with "Read more/less" links in Default field formatter for details. Patches welcome!