Difference between revisions of "Template:Readmore"

From Global Informality Project
Jump to navigation Jump to search
Line 1: Line 1:
 
<pre>


$(function(){ /* to make sure the script runs after page load */
$(function(){ /* to make sure the script runs after page load */
Line 9: Line 9:


     });
     });
</pre>

Revision as of 13:08, 1 June 2016


$(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 */

    });