JavaScript

JavaScriptで戻るボタンを使えるようにするjQueryプラグイン

(function (jQuery){ jQuery.history = this; this.init = function(){ this.loc; if(jQuery.browser.msie){ this.iframe = $('<iframe>').hide(); $("body").append(this.iframe); var iframe = this.iframe.get(0).contentWindow.document; iframe.open(); iframe.</iframe>…

ある要素が画面内に収まるようにスクロールするjQueryプラグイン

(function(){ jQuery.fn.isinwindow = function(){ var top = $(window).scrollTop(); var bottom = $(window).height() + $(window).scrollTop(); var left = $(window).scrollLeft(); var right = $(window).width() + $(window).scrollLeft(); return thi…

フォーカスすると消える灰色の説明文付テキストフィールドを作るjQueryプラグイン

(function(){ jQuery.fn.inputlabel = function(value, cls){ var input = this; if( value == undefined ) value = input.attr('name'); if( cls == undefined ) cls = 'inputlabel'; this.val(value).addClass(cls); this.focus(function(){ input.removeC…