1. 程式人生 > >js呼叫jquery中的方法

js呼叫jquery中的方法

介紹一下js呼叫jquery的例項

js中:

    function showBc(str){

    $().show(str);
    }

jq中:
jQuery(document).ready(function($) {

 $.fn.show = function(id){alert(id);}; 


}