Less.js Will Obsolete CSS
Less.js is a JavaScript implementation of LESS that’s run by your web browser. As any JavaScript, you include a link to the script in your HTML, and…that’s that. LESS is now going to process LESS code so instead of including a link to a CSS file, you’ll include a link directly to your LESS code. That’s right, no CSS pre-processing, LESS will handle it live.
The difference between ‘return false;’ and ‘e.preventDefault();’ | CSS-Tricks
The difference is that return false; takes things a bit further in that it also prevents that event from propagating (or “bubbling up”) the DOM.
About PIE – CSS3 PIE: CSS3 decorations for IE
CSS Level 3 brings with it some incredibly powerful styling features. Rounded corners, soft drop shadows, gradient fills, and so on. These are the kinds of elements our designer friends love to use because they make for attractive sites, but are difficult and time-consuming to implement, involving complex sprite images, extra non-semantic markup, large JavaScript libraries, and other lovely hacks.
Hoptoad and Javascript, Sitting in a Tree, S-E-N-D-I-N-G - GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS
We didn’t want to leave front-end developers in the dark when their Javascript throws errors, so we’ve added a Hoptoad notifier for Javascript!
pivotalexperimental's jazz_money at master - GitHub
Run your Jasmine specs without a browser
mynyml's holygrail at master - GitHub
The Holy Grail of testing for front-end development; execute browser-less, console-based, javascript + DOM code right from within your Rails test suite.
jbarnette's johnson at master - GitHub
Johnson wraps JavaScript in a loving Ruby embrace. It embeds the Mozilla SpiderMonkey JavaScript runtime as a C extension.
Announcing the jQuery Mobile Project | jQuery Mobile
The jQuery project is really excited to announce the work that we’ve been doing to bring jQuery to mobile devices. Not only is the core jQuery library being improved to work across all of the major mobile platforms, but we’re also working to release a complete, unified, mobile UI framework.
Force absolute URLs in views throughout a response
This is more tricky than it should be because url_for, asset_path, etc. all rely on different mechanisms.
Anyway, you can use the attached trait like this:
class ExampleController < ApplicationController
does 'host_enforcement', :for => 'some_action'
end
Short explanation:
-
asset_hostis used for links to stylesheets and javascripts -
asset_hostbelongs toActionController::Base-- changes are persistent and will not be reset after a request -
rewrite_optionsis used by the..._pathmethods in the views
^...
Unobtrusive JavaScript and AJAX
Attached (see below) is some code to allow using unobtrusive JavaScript on pages fetched with an AJAX call.
After you included it, you now do not use the usual
$(function() {
$('.some_tag').activateStuff();
});
any more, but instead you write
$.unobtrusive(function() {
$(this).find('.some_tag').activateStuff();
});
that is
-
$.unobtrusive()instead of$() - don't do stuff to the whole page, but just to elements nested below
$(this)
Normal pages work as before (your $.unobtrusive functions are ca...