Saturday 15 August 2015

joomla - jquery slide toggle without line break -


I'm looking for Slide-toggle jQuery for my Joomla! The website that will work in this form: I want my article to start from the beginning of the sentence and then (read more). Clicking on (read) will hide (read more) and the end of the sentence will be displayed (line-break or even without). And at the end of the full sentence, a "close" link.

For my trying, I used a problem to use a problem, but it is not working (when I start the sentence "instead of" (...) " Hiding all the contents of my Joomla article (even this is working)

HTML:

  
    ID = "containog" & gt; ;
  • A class = "opener" style = "text-decoration: none;" & gt; & lt; span style = "color: # 585858;" & gt; this sentence (...) & gt; Lt; li & gt; & lt; a class = "opener" style = "text-decoration: none;" & gt; & lt; span style = "color: # 585858;" & gt; This is the beginning of the sentence (...) Div style = "Display: none;" & gt; & lt; p & gt; This is the beginning of sentences and This end of the sentence & lt; / p & gt; & lt; / div & gt; & lt; / li & gt; & lt; / ul & gt;

    QUERY < / P>

      var $ j = jQuery.noConflict (); $ J (function () {$ j ('# containertoggle'). ('Click', 'a.opener', function) ($ j (this) .next (). Toggle ('slow'). ('P '.' ('& Lt; span & gt; [close] & lt; / span & gt;'); $ j (this) .hide ();}); $ j ('# containertoggle'). ('Click' '' 'span', function () {$ j (this) .clostest ('div'). Toggle ('slow)' closest ('li'). ('A') search. ); $ J (this) .remove ();});});