jQuery插件開發

編寫jQuery插件的兩種方式: 1. 類級別開發 2. 對象級別開發(常用) 類級別開發: 1. 直接給jQuery添加全局函數 jQuery.myAlert = function ( str ) {  alert(str); } 2. 用extend()方法 jQuery.extend({  myAlert: function ( str ) {   alert( str );  },  my
相關文章
相關標籤/搜索