A place for tricks of the trade.
You can add html elements using css like commas to lists by using ::after css selector
after each <span> element add a comma =>
#sales-tool-office-list span::after {
content: ', ';
}
on the last <span> in the list of spans dont have a comma =>
::last-child is a psuedo element css selector
#sales-tool-office-list span::last-child::after {
content: none;
}
give the color to all anchor tags on hover.
a:hover {
color: #FF00FF;
}
shorthand document ready function
$(function(){
//jQuery code here
});
to tunnel to localhost:3000 on the same network for mobile testing (besides running the ios simulator on xcode)
$ifconfig from the command line
en0 = ethernet0
en2 = ethernet1
look for inet for ethernet0 (wifi) or ethernet1 (ethernet)
<inet>:3000 will forward to your static ip on your network and forward to port 3000
cool way to rename keys in a hash
hash[:new_key] = hash.delete(:old_key)