Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 670 Bytes

File metadata and controls

28 lines (19 loc) · 670 Bytes

jQuery HTML5 Prefetch Plugin

@version: 1.0

This adds prefetch link tags in the header based on selected elements assigned when calling this function.

How To Use

Include jQuery and then include the FetchIt plugin. Next call the FetchIt plugin by selecting the urls you would like to like below:

$('.prefetch-urls').fetchIt();

Here is a more advanced look at how to use it:

(function ($) {
    $(document).ready(function () {
        // Attach fetchIt to all links inside the ul#links
        $('#links').find('a').fetchIt();
    });
}(jQuery));

Examples

There is a folder called examples with how this plugin works.