PageSourceSearch

https://www.chitaikyo.or.jp/js/jquery.rollover.js

js chitaikyo.or.jp collected 2026-10-08 22:51:17 UTC 687 bytes, 30 lines download raw bytes

1/**
2 * jQuery.rollover
3 */
4 Usage:
5 jQuery(document).ready(function($) {
6   // <img>
7   $('#navi a img').rollover();
8
9   // <input type="image">
10   $('form input:image').rollover();
11
12   // set suffix
13   $('.roll').rollover('_');
14 });
15 
16jQuery.fn.rollover = function(suffix) {
17	suffix = suffix || '_';
18	var check = new RegExp(suffix + '\\.\\w+$');
19	return this.each(function() {
20		var img = jQuery(this);
21		var src = img.attr('src');
22		if (check.test(src)) return;
23		var _on = src.replace(/\.\w+$/, suffix + '$&');
24		jQuery('<img>').attr('src', _on);
25		img.hover(
26			function() { img.attr('src', _on); },
27			function() { img.attr('src', src); }
28		);
29	});
30};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.