jquery $.fn方法

Posted fm060

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了jquery $.fn方法相关的知识,希望对你有一定的参考价值。

<script type="text/javascript">
$(function(){

		$.fn.pop=function(){
			$(‘.popbox‘).css(‘display‘,‘block‘);
			var _h=$(‘.bb‘).height();
			$(‘.bb‘).css(‘margin-top‘,-(_h/2));
		}


})
</script>

<script type="text/javascript">
$(function(){

		$(‘.cc‘).click(function(){
			$(‘Document‘).pop();
		})

})
</script>

  

以上是关于jquery $.fn方法的主要内容,如果未能解决你的问题,请参考以下文章

jQuery.extend()jQuery.fn.extend()扩展方法示例详解

jQuery $.fn 方法扩展~

实用代码片段将json数据绑定到html元素 (转)

jQuery插件扩展方法

jQuery.extend()方法和jQuery.fn.extend()方法源码分析

jquery的extend和fn.extend