![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
jQuery
Osiris_Syou
没有什么不可以
展开
-
テキストボックスをフォーカスに設定する
// テキストボックスをフォーカスに設定する。 // 使い方:$(selector).setTextBoxFocus(); // 例:$("#textBox1").setTextBoxFocus(); // お知らせ:「selector」はテキストボックス限定です。 $.fn.setTextBoxFocus = function(){ if($(this).is("input") &原创 2012-03-15 09:16:15 · 574 阅读 · 0 评论 -
滚动条滚动到指定name的锚
$.extend({ osiris : { scrollToAnchor : function(name){ if(name){ location.href="#" + name; }else{ alert("name not found!"); } } } }); // 用法 $("#btn").click(func原创 2012-03-15 12:32:52 · 588 阅读 · 0 评论 -
jQuery将div等固定在浏览器右上角的方法
//jQuery将div等固定在浏览器右上角的方法 //$(window):浏览器对象 //$(document.body):body对象 //$(document):文档对象 (function($){// 拓展自jQuery $.extend({// 静态方法写法(自定义一个叫osiris的类,避免与jQuery自身方法重名) osiris : { setTopRig原创 2012-03-14 16:23:22 · 3975 阅读 · 0 评论 -
冻结表格(tablefix)
/* * jQuery TableFix plugin ver 1.0.0 * Copyright (c) 2010 Otchy * This source file is subject to the MIT license. * http://www.otchy.net */ (function($){ $.fn.tablefix = function(options转载 2012-01-30 09:37:42 · 1755 阅读 · 0 评论 -
回到顶部,回到底部
$("#btnDown").click(function(){ var a = $(document).height() - $(window).height() $('body').animate( { scrollTop : $(document).height() - $(window).height() }, 1000); //$(document).scrollTop($(docu原创 2012-03-15 09:11:50 · 772 阅读 · 0 评论 -
[jQuery]滚动条滚动到指定选择器
$.extend({ osiris : { scrollTo : function(options){ var $target = options.target ? options.target : $('body');// 指定target,默认为'body' var speed = options.speed ? options.speed : 100原创 2012-03-15 12:05:37 · 1966 阅读 · 0 评论