jQuery 调用自定义函数

来源:互联网 发布:凯立德端口查看文件 编辑:程序博客网 时间:2024/06/06 02:30

在jQuery中如何才能定义并调用自定义函数呢

<script type="text/javascript"  >

$.extend({

    'hello': function(){

         return true;

    },

   'world': function(){

        return false;

    }

});

 

$(document).ready(function(){

     $.hello();

      $.world();

});