site-media/scripts/print-links.js @ b3eb9a757704

Move the settings to work.
author Steve Losh <steve@stevelosh.com>
date Fri, 11 Dec 2009 22:22:27 -0500
parents 94edcb30827f
children (none)
$(document).ready(function() {
    $('p:has(a)').add('ol:has(a)').add('ul:has(a)').each(function() {
        var printing_links = $(this).find('a').clone();
        $(this).after(printing_links);
        
        printing_links.wrap('<li></li>')
                      .parent()
                      .wrapAll('<ul class="print-links"></ul>');
        
        printing_links.each(function() {
            $(this).after(': ' + $(this).attr('href'));
        });
    });
});