Difference between revisions of "Template:Readmore"

Jump to navigation Jump to search
461 bytes added ,  13:03, 1 June 2016
no edit summary
Line 1: Line 1:
{{Readmore |multline=y  <!--(omit for initial hidden state)-->
<div class="item">
| style =
| headerstyle =
| header =
| contentstyle = background:#ccccff
| content =


|fw1= |fw2= |bg1= |bg2= |ta1= |ta2=
    This is the first part of the text, the part that will be seen originally.<br/>
}}
    <a href="#" class="read_more">Read More</a><br/>
 
    <span class="more_text">
        This is the extra text, that will be shown after pressing the link above.
    </span>
 
</div>
 
$(function(){ /* to make sure the script runs after page load */
 
    $('a.read_more').click(function(event){ /* find all a.read_more elements and bind the following code to them */
 
        event.preventDefault(); /* prevent the a from changing the url */
        $(this).parents('.item').find('.more_text').show(); /* show the .more_text span */
 
    });
 
});

Navigation menu