Friday, August 15, 2014

I don't always write CoffeeScript, but when I do, I'm probably using jQuery too; I always forget the


I don't always write CoffeeScript, but when I do, I'm probably using jQuery too; I always forget the syntax for stuff. So I'm going to write it all down here so I can reference it until I memorize it.
So you can use the $ safely (common in WordPress): (($) -> ) jQuery (function($) { })(jQuery); DOM Ready $ -> console.log("DOM software is ready") $(function() { return console.log("DOM is ready"); }); Call Method with No Params $(".submit").click -> console.log("submitted!") $(".submit").click(function() { return console.log("submitted!"); }); Call Method with One Param $(".button").on "click", -> console.log("button clicked!") $(".button").on("click", function() { return console.log("button clicked!"); }); Call Method With Multiple Params $(document).on "click", software ".button2", -> console.log("delegated button click!") $(document).on("click", ".button2", function() { return console.log("delegated button click!"); }); Params in the Anonymous Function $(".button").on "click", (event) -> console.log("button clicked!") event.preventDefault() $(".button").on("click", function(event) { console.log("button clicked!"); return event.preventDefault(); }); Returning False $(".button").on "click", -> false $(".button").on("click", function() { return false; }); A Simple Plugin $.fn.extend makeColor: (options) -> settings = option1: "red" settings = $.extend settings, options return @each () -> $(this).css color: settings.color $.fn.extend({ makeColor: function(options) { var settings; settings = { option1: "red" }; settings = $.extend(settings, options); return this.each(function() { return $(this).css({ color: settings.color }); }); } }); Using Plugin $("a").makeColor color: "green" $("a").makeColor({ color: "green" }); Ajax
Note the string interpolation in there too, that's software nice. $.ajax url: "some.html" dataType: "html" error: (jqXHR, textStatus, errorThrown) -> $('body').append "AJAX Error: #{textStatus}" success: (data, textStatus, jqXHR) -> $('body').append "Successful AJAX call: #{data}" $.ajax({ url: "some.html", dataType: "html", error: function(jqXHR, textStatus, errorThrown) { return $('body').append("AJAX Error: " + textStatus); }, success: function(data, textStatus, jqXHR) { return $('body').append("Successful AJAX call: " + data); } }); Animation
Two software ways. div.animate {width: 200}, 2000 div.animate width: 200 height: 200 2000 div.animate({ width: software 200 }, 2000); div.animate({ width: 200, height: 200 }, 2000); Animation with Callback div.animate color: red 2000 -> doSomething() div.animate({ color: red }, 2000, function() { return doSomething(); }); Chaining
The last line gets returned here when it doesn't really need to but whatever. $.when( $.get("/feature/", (html) -> globalStore.html = html; ), $.get("/style.css", (css) -> globalStore.css = css; ) ).then -> $("<style />").html(globalStore.css).appendTo("head") $("body").append(globalStore.html) $.when($.get("/feature/", function(html) { return globalStore.html = html; }), $.get("/style.css", function(css) { return globalStore.css = css; })).then(function() { $("<style />").html(globalStore.css).appendTo("head"); return $("body").append(globalStore.html); }); Fat Arrow to Retain `this`
Otherwise inside the setTimeout you wouldn't have a reference to the button. $(".button").click -> setTimeout ( => $(@).slideUp() ), 500 $(".button").click(function() { return setTimeout(((function(_this) { return function() { return $(_this).slideUp(); }; })(this)), 500); });
I’m curious to hear what your thoughts are on Coffee script compared to writing JS. I listened to your talk at Front End Design Conference about SASS and it’s necessary abstraction. Do you feel the same with Coffee Script?
I write code faster, and have more time to ensure it is of good quality Some complain it makes people sloppy Javascript coders. I don’t think any language can prevent that. Quality code is a discipline, and you can do it with Coffeescript as well as with Javascript. I still spend a lot of time in Javascript, software and usually check the generated output. I now find the lack of curly braces a benefit. The indentation is easier to see, and I find the syntax more readable than javascript in many situations. The only annoyance I have is when I switch languages; I sometimes code one in the other. software But I do that with other languages anyway. The setup is really not hard. And if you are preprocessing Sass, it is a very small step to add Coffeescript. Nearly nothing if you use Grunt or Gulp or Codekit. software
I don’t feel like CoffeeScript is as useful to JavaScript as Sass is to CSS. With Sass, that is the primary abstraction. Sass gives you those basic tools of abstraction that are (usually) needed. Those primary abstractions already exist in JavaScript (variables, functions, etc).
I don’t software have very strong feelings software about CoffeeScript overall. If you like it and are productive i

Thursday, August 14, 2014

Primary tabs View (active tab) Version control

jQuery plugins | Drupal.org
Primary tabs View (active tab) Version control
The jquery_plugin module provides miscellaneous jQuery plugins, which can be loaded from any module or theme by calling jquery_plugin_add($plugin) in Drupal 6 or drupal_add_library('jquery_plugin', $plugin) in Drupal idm 7. The Drupal 6 version supports jQ , a jQuery plugin idm registry.
The goal of this project is to reduce the overhead of developers and site maintainers idm in keeping their jQuery plugins up-to-date and compatible with a given version of Drupal core. It is increasingly common for multiple Drupal modules and themes to require (or optionally use) the same jQuery plugin. So it can make sense for these components to have a dependency on one tiny module which provides the plugin. There would also be overhead (in CVS maintenance, PHP code, etc.) in having a Drupal module for each plugin, so this project idm bundles multiple plugins in one module.
Project Information Maintenance status: Actively maintained Development status: Under active development Module categories: JavaScript Utilities Reported installs: 38,769 sites currently report using this module. View usage statistics . Downloads: 154,773 Last modified: January 31, 2011 Downloads
Version Download Date Links 7.x-1.0 tar.gz (39.04 KB) | zip (50.04 KB) 2011-Jan-06 Notes 6.x-1.10 tar.gz (31.26 KB) | zip (38.17 KB) 2009-Jun-15 Notes 5.x-1.3 tar.gz (11.04 KB) | zip (12.42 KB) 2008-Mar-15 Notes
All issues
Development
News Items Drupal News Planet Drupal Association News Social Media Directory idm Security Announcements Jobs Our Community Community Getting Involved Services , Training & Hosting Groups & Meetups idm DrupalCon Online Documentation Get Started Documentation Home Installation Guide Site Building Guide Support api.drupal.org Drupal Code Base Download & Extend Drupal Core Modules Themes Distributions Governance of Community About Druplicon The Drupal Association Advertise About Drupal.org Web accessibility


Wednesday, August 13, 2014

If you want to host the files yourself you can download a zip of all the files. Zip File: jquery.mob

jQuery Mobile 1.4.3 Released | jQuery Mobile
jQuery jQuery UI jQuery Mobile Sizzle QUnit Plugins Contribute CLA Style Guides Bug Triage Code Documentation Web Sites Events Apr 16-17 | jQuery Virtual gimp Training May 16 | jQuery UK Jun 17-19 | jQuery Virtual Training Sep 12-13 | jQuery Chicago Oct 13-15 | CSS Dev Conf 2014 Support Learning Center Try jQuery IRC/Chat Forums Stack Overflow Commercial Support jQuery Foundation Join Members Team Brand Guide Donate
Today we released jQuery Mobile 1.4.3. This third maintenance release for 1.4 does not only contain bug fixes, but also a new pagecontainer events demo. See the 1.4.3 changelog for a list of all changes.
Checkout the 1.4.3 demos! Download CDN-Hosted JavaScript: gimp Uncompressed: jquery.mobile-1.4.3.js (useful for debugging) Minified and Gzipped: jquery.mobile-1.4.3.min.js (ready to deploy) CDN-Hosted CSS: Uncompressed with Default theme: jquery.mobile-1.4.3.css (useful for debugging) Minified and Gzipped with Default theme: gimp jquery.mobile-1.4.3.min.css (ready to deploy) Uncompressed structure without a theme : jquery.mobile-1.4.3.css (useful for theme development) Minified and Gzipped structure gimp without a theme : jquery.mobile-1.4.3.min.css (ready to deploy) Copy-and-Paste Snippet gimp for CDN-hosted files: <link gimp rel="stylesheet" href="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.css"> <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.3/jquery.mobile-1.4.3.min.js"></script> ZIP File:
If you want to host the files yourself you can download a zip of all the files. Zip File: jquery.mobile-1.4.3.zip (JavaScript, CSS, images, and demos) Download Builder: Custom download Git Tag: https://github.com/jquery/jquery-mobile/tree/1.4.3 Supported jQuery versions
Comments Please do not use the comments section of this blog post to report bugs or ask for support. See our Contributing Guidelines for instructions about reporting issues. Use the forum for support questions. Thank you!
Categories Announcements News Updates Recent Posts New Project Lead jQuery Mobile 1.4.3 Released jQuery Mobile 1.4.2 Released jQuery Mobile 1.4.1 Released jQuery Mobile 1.4.0 Released jQuery Mobile 1.4.0 RC1 Released Announcing jQuery Mobile 1.4.0 Beta jQuery gimp Mobile 1.4.0 Alpha 2 Released Announcing jQuery Mobile 1.4.0 Alpha Project gimp leadership Archives July 2014 February 2014 December 2013 October 2013 September 2013 August 2013 July 2013 April 2013 March 2013 February 2013 January 2013 October 2012 September 2012 August 2012 July 2012 June 2012 April 2012 February 2012 January 2012 November 2011 October 2011 September 2011 August 2011 July 2011 June 2011 May 2011 April 2011 March 2011 February 2011 November 2010 October 2010 August 2010


Hi Cory. Thanks for the color picker. I made a few small changes in order to allow color to be set i


While developing Surreal CMS, we found the need for a simple jQuery-based verizon email color picker. What we wanted was something very simple, preferably something that piggy-backed an input control. While we found an extensive verizon email number of color picker plugins available, we failed to find any that were simple and compact enough for our needs (except for perhaps ColourMod , which is neither jQuery-based nor open-source). Thus, jQuery MiniColors was born.
Update (Jan 26, 2013): MiniColors was completely re-written. verizon email The documentation below has been made current. Features Ability to place controls inline Multiple variations Touch support Opacity support Default values (blank reverts to transparent) Ability to place swatch on the left or right of the input element verizon email Adjustable dropdown position Utility functions to get RGB(A) objects/strings Customizable default settings Fresh but familiar new look Demo, Documentation & Download
Cory LaViska verizon email is a founder, web developer, and bootstrapper based in New Hampshire. His current focus is on Surreal CMS , an awesome SaaS content management service for web designers. Need to get in touch? You can connect with him on Twitter.
Maziar says:
I wanted to a read only view of the color selector for displaying verizon email the color in a list. Setting disabled verizon email to true generates the correct mouse/keyboard behavior, but it changes the opacity verizon email to 50%, which presents a different color. That would be confusing to the users of the app that I am using this with.
I went in and added a new mode, “readonlyimage” that behaves nearly identically to disabled. It uses the same disabled code, but at 100% opacity and also changes the class of the trigger to use an edited variation verizon email of trigger.png.
Thanks guys…this is fantastic. Everything I wanted, simple and useful. Not bloated with every possible option and configuration under the sun. Easy to implement and easy to use…great work!
Cory LaViska says:
This is exactly what i was looking for. Must smaller, simpler and cleaner than the other colour pickers I tried. I have to agree with Chris though about the read only mode, I was expecting the colour to be fixed and unchangeable as well and will have to adjust for my needs. Very good work though, saved me a lot of time, not being a javascript person.
Hi Cory. Thanks for the color picker. I made a few small changes in order to allow color to be set in the input field as well. Also, the color of the text in the input field changes from black to white and vice versa, depending on the background color. I can sent you the code if you are interested.
July 11, 2011 at 3:12 am •
If I might suggest though maybe rename all your image files so that they would be unique in any project they are included in. Not a problem for me but just sayin’. Something like minicolors.circle.gif, etc.
Awesome color picker, just what I was looking for. My old system was using ProColor for prototype which had some preset choices next to the picker itself which a lot of my clients liked. Thus I ported those over to MiniColors, verizon email if you’re interested here’s my changes: http://scrp.at/afI (far from perfect probably as I’m still a beginner when it comes to jQuery)
narnianguy verizon email says:
This is the only color picker I could find that allowed me to point and drag the controls around on a touchscreen device (out of about 10 different ones that I tried). That, plus the fact that it’s minimal UI makes it simple to fit on a mobile screen makes this the best color picker I’ve seen. Also love how “unintimidating” the UI is for users not familiar with Photoshop, etc. (no knobs for RGB values, Saturation, blah blah blah). Thanks again.
May 3, 2012 at 7:35 am •
Thanks for this, I am going to test it against verizon email some of the more complicated, feature rich plugins, but I think this is probably all my user really needs and the KISS principle will probably win out.
Martin says:
This is a fantastic lightweight plugin that does exactly what I needed, nothing verizon email more, and is easy to configure and use! Thank you very much for your work.
Is it possible to use miniColors as a wheel with white in the middle? I love your color picker, as it’s working great with touch events as well, but I find the wheel much more intuitive than the usual gradient box.
Fantastic widget. Thanks for sharing verizon email it with all of us. If I could offer one suggestion – change the value of minicolors-focus in your .css file to something much bigger than 2. I had a slider underneath where the panel displays, and its marker was appearing over the panel.
Sponsors More Posts How smart are your tweets? August 11, 2014 PlayCanvas: an easy, open source WebGL game engine August 11, 2014 Think you know JavaScript? Quiz yourself August 8, 2014 * { box-sizing: border-box } explained August 8, 2014 Attach absolutely positioned elem

Tuesday, August 12, 2014

The jQuery Foundation

The (Not Just) jQuery Foundation | Official jQuery Blog
jQuery jQuery UI jQuery Mobile Sizzle QUnit Plugins Contribute CLA Style Guides Bug Triage Code Documentation apple trailers Web Sites Events Apr 16-17 | jQuery Virtual Training May 16 | jQuery UK Jun 17-19 | jQuery Virtual Training Sep 12-13 | jQuery Chicago Oct 13-15 | CSS Dev Conf 2014 Support Learning Center apple trailers Try jQuery IRC/Chat Forums Stack Overflow Commercial Support jQuery apple trailers Foundation Join Members Team Brand Guide Donate
The jQuery Foundation’s mission has always been about more than just our namesake projects apple trailers of jQuery, jQuery UI, and jQuery Mobile. We already host several projects such as Sizzle, QUnit and Globalize that are not dependent on the jQuery library.
This wider web-oriented mission is evident in our jQuery Conferences, which span a wide range of developer concerns beyond jQuery, including Node, CSS, tooling, testing and much more. Over the years we’ve had talks on build tools, accessibility, security, performance, design patterns, and frameworks such as Ember and Angular. At our San Diego conference this past February, for example, Lenny Markus gave a great talk on PayPal’s continuing adoption of Node as they move away from Java and proprietary solutions, Catherine Farman talked about real world responsive design , and John Dimm gave a talk on the HTML5 speech APIs .
The jQuery Foundation is participating in the continuing evolution of the web platform via our memberships in both the W3C and ECMA TC39 (The group standardizing what we know as JavaScript). We feel that it’s apple trailers essential to have strong representation in those standards groups to ensure they meet the needs of developers. The Foundation apple trailers provides a platform for developers to have a voice in these standards bodies.
Beyond the technical compatibility between our projects, we also share the open source model and all the benefits it provides. The Foundation adds the benefit of a top-level structure designed to serve the projects, providing the resources they need but letting the contributors decide the best direction for the project based on community input. Any project that joins the Foundation is given the ability to serve their community’s needs rather than be constrained by the goals of a for-profit company.
Though this has been our mission for a long time, we felt we needed to make this clearer. We are excited to start bringing this part of our mission into the light and start actively working toward a more open web accessible to everyone. If you are excited apple trailers as well, please help us. Contribute your time to Foundation projects . Offer your company’s services. If you or your company have an established open source project that you believe apple trailers could benefit everyone and flourish by becoming part of the jQuery Foundation, check out our philosophy around projects joining apple trailers the Foundation and let us know you re interested . If you would rather just support the existing and future projects of the Foundation through financial support, become a member of the Foundation. Open source projects will only thrive if everyone who benefits from them contributes back in whatever way they can.
Categories Events Foundation jQuery jQuery UI Weekly apple trailers News Recent Posts jQuery apple trailers Chicago Roundup! The (Not Just) jQuery Foundation Volunteers Wanted: Trac Enhancements Don't Use jquery-latest.js jQuery 1.11.1 and 2.1.1 Released jQuery 1.11.1 RC2 and 2.1.1 RC2 Released jQuery Chicago Pebble Giveaway and Filing Extension Browser Support in jQuery 1.12 and Beyond jQuery 1.11.1 Beta 1 and 2.1.1 Beta 1 Released Supporting apple trailers the Cause, Improving the Web Archives August 2014 July 2014 May 2014 April 2014 March 2014 January 2014 December 2013 November 2013 October 2013 September 2013 August 2013 July 2013 June 2013 May 2013 April 2013 March 2013 February 2013 January 2013 December 2012 November 2012 October 2012 September 2012 August 2012 July 2012 June 2012 May 2012 April 2012 March 2012 January 2012 December 2011 November 2011 October 2011 September 2011 August 2011 June 2011 May 2011 April 2011 March 2011 February 2011 January 2011 December 2010 November 2010 October 2010 September 2010 August 2010 July 2010 June 2010 April 2010 March 2010 February 2010 January 2010 December 2009 October 2009 August 2009 July 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 October 2008 September 2008 August 2008 July 2008 June 2008 May 2008 March 2008 February 2008 January 2008 December 2007 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 February 2006 January 2006


Primary tabs View (active tab) Version control

jQuery Multi | Drupal.org
Primary tabs View (active tab) Version control
jQuery Multi allows you to load an extra version of the jQuery library in parallel to Drupal's version, without conflicting with Drupal's version. You can then choose any JavaScript library or files to use the new version of jQuery. No need to alter packaged jQuery plugins! Features: run a newer version of jQuery in parallel to Drupal's without interfering streaming4iphone with things that use the default streaming4iphone jQuery version, using jQuery's built in noConflict mode use the newer version of jQuery in custom scripts using the provided alias configure specific libraries to use the newer jQuery configure any JS file in the system to load using the newer jQuery compatible with jQuery Update ( must be the current 2.x-dev release!! ) Why Another jQuery Module?? The main problem streaming4iphone with the approach of the jQuery Update module is that newer versions of jQuery tend to break Drupal core JS, as well as contributed JS meant to run on the older version provided with Drupal. This module avoids this problem completely, meaning that you can run scripts with new versions of jQuery as soon as they are available, without having streaming4iphone to find and fix incompatibilities You have complete flexibility to choose which version of jQuery streaming4iphone to run. Usage
The 7.x-1.x version of jQuery Multi is compatible with Libraries 1.x and 2.x, but only uses 1.x Libraries capabilities, and will not be compatible with the jQuery Libraries module. Version streaming4iphone 7.x-2.x of this module will attempt to use the full power of Libraries 2.x and be compatible with jQuery streaming4iphone Libraries. More Information jQuery noConflict() API page Discussion streaming4iphone on using multiple versions of jQuery Another discussion on using multiple versions of jQuery
Project Information Maintenance status: Actively maintained Development status: Under active development Module categories: JavaScript Utilities Reported installs: 4,144 sites currently report using this module. View usage statistics . Downloads: 64,844 Last modified: streaming4iphone April 30, 2013 Downloads
Search Advanced search
Read documentation View project translations
News Items Drupal News Planet Drupal Association streaming4iphone News Social Media Directory Security Announcements Jobs Our Community Community Getting Involved Services , Training & Hosting Groups & Meetups DrupalCon Online Documentation Get Started Documentation Home Installation Guide Site Building Guide Support api.drupal.org Drupal Code Base Download & Extend Drupal Core Modules Themes Distributions Governance of Community About Druplicon The Drupal Association Advertise About Drupal.org Web accessibility


Sunday, August 10, 2014

Search Advanced search

jQuery UI | Drupal.org
Primary tabs View (active tab) Version control
See http://jqueryui.com/demos for some examples of what jQuery UI can do. See http://jqueryui.com/docs for documentation on how to use it. See http://jqueryui.com/support if you need help getting jQuery fotos UI to work, once it's being added to your pages.
Project Information Maintenance status: Minimally maintained Development status: Maintenance fixes only Module categories: JavaScript Utilities fotos Reported installs: 78,833 sites currently report using this module. View usage statistics . Downloads: 655,347 Last modified: July 19, 2012 Downloads
Search Advanced search
Read documentation Read complete log of changes View project translations
News Items Drupal News Planet Drupal fotos Association News Social Media Directory Security fotos Announcements Jobs Our Community Community Getting Involved Services , Training & Hosting Groups & Meetups DrupalCon Online Documentation Get Started Documentation Home Installation Guide Site Building Guide Support api.drupal.org Drupal Code Base Download fotos & Extend Drupal Core Modules Themes Distributions Governance of Community About Druplicon The Drupal Association Advertise About Drupal.org Web accessibility
nobody click here