随笔分类 -  ★Laker‘s 技术乱侃 > Javascript、Coffeescript

摘要:1.Basic usage and description1.1.bind( eventType [, eventData ], handler(eventObject) )http://api.jquery.com/bind/Description:Attach a handler to an event for the elements.Unbind function: unblnd()1.2.live( events, handler(eventObject) )http://api.jquery.com/live/ Remoed from 1.9 versionDescription: 阅读全文
posted @ 2013-10-02 16:10 youngLaker 阅读(208) 评论(0) 推荐(0)
摘要:All these plugins you can install by package controller.1.First installpluin"SASS" It providesyntax highlighting and tab/code completion for Sass and SCSS files2.Installpluin "SublimeOnSaveBuild"It can trigger a build on each save. It just trigger the ".sublime-build" f 阅读全文
posted @ 2013-09-10 12:54 youngLaker 阅读(409) 评论(0) 推荐(0)
摘要:All these plugins you can install by package controller.1.CoffeeScript It providesyntaxhighlight, code auto compelement, compile coffee into javascript, recompile and so on. Shotcuts: alt+shift+t - Run a Cake task alt+shift+r - Run some CoffeeScript (puts/print is available for outpu... 阅读全文
posted @ 2013-09-09 16:29 youngLaker 阅读(443) 评论(0) 推荐(0)
摘要:The CoffeeScript compiler is itselfwritten in CoffeeScript, using theJison parser generator. The command-line version ofcoffeeis available as aNode.jsutility.1. Install Nodejs The most easy way is to download the msi filre fromhttp://nodejs.org/. If you don't know how to install msi file ,you... 阅读全文
posted @ 2013-08-31 19:01 youngLaker 阅读(429) 评论(0) 推荐(0)
摘要:I'm doingan activitybased applications,which needtime pickers.Because of the use ofBootstrap,Icollected somegoodtime pickers based in Bootstrap,and share with you.1.Date range pickerhttp://www.dangrossman.info/2012/08/20/a-date-range-picker-for-twitter-bootstrap/https://github.com/dangrossman/bo 阅读全文
posted @ 2013-08-13 01:53 youngLaker 阅读(357) 评论(0) 推荐(0)
摘要:Popular javascript convention , I'm used to all except the sigle quote.1)Last comma.逗号在变量的后面2)Space.用空格进行缩进3)Function followed by no space.定义函数时函数名后面没有空格4)Arguments definition with one space.函数参数头尾没空格5)Object Literal Definition types followed by spaceObject.属性定义后面跟空格6)Condition with one space.条件 阅读全文
posted @ 2013-07-24 20:39 youngLaker 阅读(264) 评论(0) 推荐(0)
摘要:在mygoare的指导下,大致看了一下实现过程,感谢毛哥,每次和他交谈都受益匪浅~ 下面以豆瓣读书为例,在未登陆状态下,点击“想读”等按键,会弹出登陆框查看此元素,有两个特殊的类“j”“a_show_login”。关于右边的事件绑定,进去这个js文件并不能找到相关功能,所以我只好全部搜索其他js文件。根据常规命名习惯可以猜想,这个登陆框的函数应该是“show_login”,所以搜索的关键字是“show_login”,挨个js文件搜索。最后在 "packed_master2876199327.js"找到相关方法, load_event_monitor方法,给所有带 “j”的类 阅读全文
posted @ 2013-05-16 01:38 youngLaker 阅读(617) 评论(1) 推荐(0)
摘要:Iwant to writeastaranimation,soitestfadeOutandfadeIn,butitdoesn’tworkifonlyuse<img>tag.function shining_stars(star) { $(".star").fadeOut(1000);};shining_stars(".star"); <img src="img/3.jpg" /> IamwonderingifthefadeOuthasanyproblem.butitesta<p>tag,itwor 阅读全文
posted @ 2013-03-29 11:25 youngLaker 阅读(250) 评论(0) 推荐(0)
摘要:function scroll(img_list, img_num) { var content = $(img_list); var w = content.find('li').outerWidth(true); content.animate({"margin-left": parseInt(-w*this_index)}); this_index++; if(this_index >= img_num) this_index = 0; consol... 阅读全文
posted @ 2013-03-24 02:11 youngLaker 阅读(285) 评论(0) 推荐(0)