- 浏览: 2049136 次
- 性别:
- 来自: NYC
文章分类
- 全部博客 (628)
- Linux (53)
- RubyOnRails (294)
- HTML (8)
- 手册指南 (5)
- Mysql (14)
- PHP (3)
- Rails 汇总 (13)
- 读书 (22)
- plugin 插件介绍与应用 (12)
- Flex (2)
- Ruby技巧 (7)
- Gem包介绍 (1)
- javascript Jquery ext prototype (21)
- IT生活 (6)
- 小工具 (4)
- PHP 部署 drupal (1)
- javascript Jquery sort plugin 插件 (2)
- iphone siri ios (1)
- Ruby On Rails (106)
- 编程概念 (1)
- Unit Test (4)
- Ruby 1.9 (24)
- rake (1)
- Postgresql (6)
- ruby (5)
- respond_to? (1)
- method_missing (1)
- git (8)
- Rspec (1)
- ios (1)
- jquery (1)
- Sinatra (1)
最新评论
-
dadadada2x:
user模型里加上 protected def email ...
流行的权限管理 gem devise的定制 -
Sev7en_jun:
shrekting 写道var pattern = /^(0| ...
强悍的ip格式 正则表达式验证 -
jiasanshou:
好文章!!!
RPM包rpmbuild SPEC文件深度说明 -
寻得乐中乐:
link_to其实就是个a标签,使用css控制,添加一个参数: ...
Rails在link_to中加参数 -
aiafei0001:
完全看不懂,不知所然.能表达清楚一点?
"$ is not defined" 的问题怎么办
$.ajax '/', type: 'GET' dataType: 'html' error: (jqXHR, textStatus, errorThrown) -> $('body').append "AJAX Error: #{textStatus}" success: (data, textStatus, jqXHR) -> $('body').append "Successful AJAX call: #{data}"
单个select的调用
$(document).ready(function() { $('#display_arms').change(function(){ $.ajax({url: 'YOUR URL', data: 'display_arms=' + value, success: function(data){ $('#display_arms').html(data); } }) }); });
一组select的onchange
$("form.submit_on_change").each(function(idx,form){ $(form).find("select,input").each(function(idx,element){ $(element).change(function(){ $(form).submit(); return false; }); }); });
function PopulateDropdown() { $.ajax({ type: "POST", url: "../CommonWebService.asmx/GetData", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { $("select[id^='MyDropDown']").empty(); $.each(msg.d, function () { $("select[id^='MyDropDownSelect']").append($("<option></option>").val(this['IdIndexDataType']).html(this['DataTypeName'])); }); $("select[id^='MyDropDown']").css("width", "auto"); }, error: function (e1) { alert("Error - " + e1.toString()); } }); }
function badFixSelectBoxDataWidthIE() { if ($.browser.msie) { $('select').each(function() { if($(this).attr('multiple') == false) { $(this).mousedown(function() { if($(this).css("width") != "auto") { var width = $(this).width(); $(this).data("origWidth", $(this).css("width")).css("width", "auto"); // If the width is now less than before then undo if($(this).width() < width) { $(this).unbind('mousedown'); $(this).css("width", $(this).data("origWidth")); } } }) // Handle blur if the user does not change the value .blur(function() { $(this).css("width", $(this).data("origWidth")); }) // Handle change of the user does change the value .change(function() { $(this).css("width", $(this).data("origWidth")); }); } }); } }
if (jQuery.browser.msie) { jQuery('#mySelect').focus(function() { jQuery(this).width('auto'); }).bind('blur change', function() { jQuery(this).width('100%'); }); };
发表评论
-
brew service restart
2013-07-06 22:56 1376brew services restart memcached ... -
git如何合并 多个commit
2013-07-02 20:42 9297需要先搞明白rebase 然后,进这个界面 pick b ... -
rvm create gemset
2013-07-01 09:00 1214rvm ruby-1.9.3-p429 do rvm gems ... -
关于devise结合github通过omniauth登录
2013-06-24 04:47 4101最近写了个github帐户登录Demo: https://gi ... -
cdata 和 xml xmlParseEntityRef: no name 错误
2013-05-04 00:24 4937Problem: An XML parser returns ... -
一目了然 rails html xml encode decode
2013-05-03 23:37 30471.9.2p320 :001 > require ' ... -
使用scope 链接多个where条件
2013-05-02 09:17 2560scope :by_category, (lamb ... -
在rspec里使用 route path
2013-05-01 20:09 956Rspec.configure do |config| ... -
select_tag default value & options
2013-04-10 21:40 2155#If you are using select_tag ... -
Jquery array remove
2013-04-10 21:38 4483Array.prototype.remove = fu ... -
ruby readline的两种写法
2013-04-09 10:21 861f = File.read('public/file.cs ... -
关于encoding utf-8
2013-04-04 20:55 4042一 gem解决方案 https://github.com/m- ... -
我见过最清楚的解释class_eval 和 instance_eval
2013-04-02 07:06 3278忘了,看一次就能回忆起来 class A # def ... -
multiple provider oauth
2013-04-01 11:13 1229Allowing users to login with mu ... -
oauth github和multiple oauth
2013-04-01 11:08 1511http://railscasts.com/episodes/ ... -
Ruby Jquery 地图,地理信息相关资源
2013-03-22 20:32 896Railscast Geocorder Geocorde ... -
load migrate file and load
2013-03-22 05:52 949Dir[Rails.root.join('db','mig ... -
Brew update problem
2013-03-22 05:48 1284引用 MBA:~ fortin$ brew update er ... -
Jquery sort table number
2013-03-19 01:01 1102So here is what the column is s ... -
update_all
2013-03-13 02:09 1296Article.limit(2).update_all [&q ...
相关推荐
函数调用 10 函数上下文 11 对象字面量与数组定义 11 流程控制 12 字符串插值法 14 循环和列表解析 14 数组 15 别名和存在操作符 16 类 17 实例属性 18 静态变量 19 继承与Super 20 Mixins 21 扩展类 22 ...
CoffeeScript 是一门编译到 JavaScript 的小巧语言. 在 Java 般笨拙的外表下, JavaScript 其实有着一颗华丽的心脏. CoffeeScript 尝试用简洁的方式展示 JavaScript 优秀的部分.
CoffeeScript 中文文档 详细说明了CoffeeScript的语法和与JavaScript同样的实现
公认的学习coffeescript 比较好的入门书籍,讲得很详细。
coffeescript-java 是一个简单的 Java 类用来将 CoffeeScript 脚本转成 JavaScript 脚本。程序直接利用 Java 的脚本引擎来实现。 标签:coffeescript
coffee script.pdf: coffee script book
Over 90 hands-on recipes to help you develop engaging applications using CoffeeScript About This Book Use CoffeeScript to create and test applications and backend services Build applications using ...
CoffeeScript is a JavaScript compiler. CoffeeScript brings many things to the table that are lacking in JavaScript itself. This includes a class and module system, a syntax that is cleaner, less terse...
[Addison-Wesley Professional] CoffeeScript 编程 口袋书 (英文版) [Addison-Wesley Professional] The Little Book on CoffeeScript (E-Book) ☆ 出版信息:☆ [作者信息] Alex MacCaw [出版机构] Addison-...
CoffeeScript是一套JavaScript的转译语言,创建者 Jeremy Ashkenas 戏称它是- JavaScript 的不那么铺张的小兄弟。因为 CoffeeScript 会将类似 Ruby 语法的代码编译成 JavaScript,而且大部分结构都相似,但不同的是 ...
CoffeeScript小书,很简单新手入门书籍
CoffeeScript is a little language that compiles into JavaScript. Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good ...
CoffeeScript is a little language that compiles into JavaScript. Underneath that awkward Java-esque patina, JavaScript has always had a gorgeous heart. CoffeeScript is an attempt to expose the good ...
CoffeeScript小书+CoffeeScript Coobook 中文版 - v1.1
基于Koa2-CoffeeScript-PostgreSQL的服务器开发示例
NODEJS NPM COFFEESCRIPT