本文实例汇总了基于jQuery的项目常见函数封装。分享给大家供大家参考,具体如下:
/// <reference path=jquery-1.8.0.min.js>
/*
* DIV或元素居中
* @return
*/
jQuery.fn.mCenterDiv = function () {
this.css(position, absolute);
this.css(border, 1px solid #ccc);
this.css(top, ($(window).height() - this.height()) / 2 + $(window).s