ITeye博客

jQuery

共 2 篇文章

模拟alert对话框,N秒不点击自动关闭(基于jQuery模式对话框)

jQuery 模式对话框地址:http://jqueryui.com/demos/dialog/ 代码: [code="js"] //jquery.alert.js (function($){ $.alert = function(message, timeToLive, options){ var ttl = timeToLive || 1000; var defaultOptions = $.extend({ title:window.location.host, height: 130, width: 385, modal: false },options || {}); if(!$(…

2009-12-04 18:38 · jQuery · HTML · UI · jQuery · Rails · JavaScript

JQuery笔记

天才第一步: :oops: :oops: 下载jQuery.js并保存在网页可以存取的位置。下载链接: http://docs.jquery.com/Downloading_jQuery 在HTML的head里引用jQuery.js 运用jQuery的方法 {:a => 1, :b => 3} merged_obj = obj.merge(:c => 4, :a => 5) #=> {:a=>5, :b=>3, :c=>4} js merge Object: var settings = { validate: false, limit: 5, name: "foo" }; var opti…

2009-09-20 15:59 · jQuery · Ruby · 正则表达式 · json · jQuery · Rails