Sha256: 9019e960ca21560f91b4f49db1eb4288152f6dcadbc6f42fa376d61ede56ef7a
Contents?: true
Size: 686 Bytes
Versions: 4
Compression:
Stored size: 686 Bytes
Contents
(function (jQuery) { jQuery.mark = { jump: function (options) { var defaults = { selector: 'a.scroll-on-page-link' }; if (typeof options == 'string') defaults.selector = options; var options = jQuery.extend(defaults, options); return jQuery(options.selector).click(function (e) { var jumpobj = jQuery(this); var target = jumpobj.attr('href'); var thespeed = 1000; var offset = jQuery(target).offset().top; jQuery('html,body').animate({ scrollTop: offset }, thespeed, 'swing') e.preventDefault(); }) } } })(jQuery); jQuery(function(){ jQuery.mark.jump(); });
Version data entries
4 entries across 4 versions & 2 rubygems