This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Reset | |
By Eric Meyers | |
PURPOSE: | |
Resets everything to zero for better browser compatibility | |
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, p, blockquote, pre, a, | |
abbr, acronym, address, big, cite, code, small, strike, strong, sub, sup, tt, var, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Inspired by | |
# http://dev.rubyonrails.org/svn/rails/plugins/account_location/lib/account_location.rb | |
# | |
module SubdomainAccounts | |
def self.included( controller ) | |
controller.helper_method(:account_domain, :account_subdomain, :account_url, :current_account, :default_account_subdomain, :default_account_url) | |
end | |
protected |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1) Point *.example.com in your DNS setup to your server. | |
# | |
# 2) Setup an Apache vhost to catch the star pointer: | |
# | |
# <VirtualHost *:80> | |
# ServerName example.com | |
# ServerAlias *.example.com | |
# </VirtualHost> | |
# | |
# 3) Set the current account from the subdomain |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// USAGE EXAMPLE (in HTML) | |
// <script type="text/javascript"> | |
// new ResizingTextArea("dom_id_for_textarea_here"); | |
// </script> | |
var ResizingTextArea = Class.create(); | |
ResizingTextArea.prototype = { | |
defaultRows: 2, | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* You can use any element aside from the example below. | |
How it works is that you simply create .hover, .active styles | |
for whatever element you use this on. Works very well. Uses | |
the underscore hack to targe ie6. | |
*/ | |
input, button { | |
_azimuth: expression( | |
this.onmousedown = this.onmousedown || new Function("this.className += ' active'"), | |
this.onmouseup = this.onmouseup || new Function("this.className = this.className.replace('active','')"), |
NewerOlder