1. DOM Ready Jquery $(document).ready(function(){ // Code }); YUI Y.on("domready", function(e){ // Code }); 选择器支持 <div class=&qu ...

    阅读全文
  2. var // The deferred used on DOM ready readyList, // A central reference to the root jQuery(document) rootjQuery, // Support: IE<10 // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` core_strundefined = ty ...

    阅读全文
  3. jQuery.fn = jQuery.prototype = {..........}; // Give the init function the jQuery prototype for later instantiation jQuery.fn.init.prototype = jQuery.fn; jQuery.extend = jQuery.fn.extend = function() {........}; jQuery.extend(.... ...

    阅读全文
  4. jQuery.extend = jQuery.fn.extend = function() { var src, copyIsArray, copy, name, options, clone, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false; // Handle a deep copy situation if ( typeof target == ...

    阅读全文
  5. Features Multiple file upload(多文件上传): Allows to select multiple files at once and upload them simultaneously. Drag & Drop support(支持D&D操作): Allows to upload files by dragging them from your desktop or filemanager and dropping them ...

    阅读全文
  6. 最基本最简单的设置 如果想搭建自己的UI,可以仅仅使用basic plugin版本和最小的设置。下面是官网上提供首页index.html,只有最少的需求和最简单done回调处理程序。(参考官网提供的 API 和选项 Options 看如何使用不同的选项和回调函数): <!DOCTYPE HTML> <html> <head> <meta charset="utf-8"> ...

    阅读全文
  7. 这段代码是正在使用的一个小框架,发现extend的实现有点问题,于是深入研究下js的继承实现的细节问题。 Class=function(){ var klass = function(){ this.init.apply(this,arguments); } klass.prototype.init = function(){}; klass.supper = function(){}; klass.extend = ...

    阅读全文
  8. Attributes vs. Properties The difference between attributes and properties can be important in specific situations. Before jQuery 1.6, the .attr() method sometimes took property values into account when retrieving some attributes, which could ca ...

    阅读全文
  9. desktop电脑上访问页面可以很好的通过鼠标事件来实现drag & drop拖放功能,可是如何在触摸屏上来实现这个功能? 首先:有没有这个需求? 来自下面链接的讨论 http://stackoverflow.com/questions/3382393/html5-drag-and-drop-api-on-touch-screen-devices 有一种观点就是: 没有必要,至少不必须。最好的解决办法就是面向设备设计两套UI。 Touch and drag ...

    阅读全文