Latest 100 public snipts »
terramar's
snipts
showing 1-9 of 9 snipts
-
∞ Format phone numbers in spreadsheet
="("&MID(A2,1,3)&") "&MID(A2,4,3)&"-"&MID(A2,7,4) -
∞ Concatenate first and last name
=B10&", "&C10
-
∞ Javascript image replacement based on class name
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function() { var tcells = document.getElementsByTagName("td"); for (i=0;i<tcells.length;i++) { var tcell = tcells.item(i); if (tcell.className == "status") { if (tcell.innerHTML == "Open") tcell.innerHTML = '<img src="/image/open.gif" />'; else if (tcell.innerHTML == "Closed") tcell.innerHTML = '<img src="/images/open.png" />'; } } return false; }); </script>
-
∞ Find duplicate entries in a spreadsheet
=IF(B2=B1,"DUPL","")
-
∞ Generate formatted phone number for use in spreadsheets (e.g. 1111111111 to (111) 111-1111)
="("&LEFT(L3,3)&") "&MID(L3,4,3)&"-"&RIGHT(L3,4) -
∞ Creates selectable area all around text
#navigation li a { display:block; }
-
∞ Attribute Specific Icons
a[href$='.pdf'] { padding:0 20px 0 0; background:transparent url(/graphics/icons/pdf.gif) no-repeat center right; }
-
∞ IE6 PNG Transparency
* html img, * html .png { position:relative; behavior: expression((this.runtimeStyle.behavior="none")&&(this.pngSet?this.pngSet=true:(this.nodeName == "IMG" && this.src.toLowerCase().indexOf('.png')>-1?(this.runtimeStyle.backgroundImage = "none", this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "', sizingMethod='image')", this.src = "transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''), this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "', sizingMethod='crop')", this.runtimeStyle.backgroundImage = "none")),this.pngSet=true) ); }
-
∞ Horizontal CSS (<li>) Navigation
#navigation ul { margin: 0px; padding: 0px; font-family: Verdana,arial; font-size: 14px; font-weight: bold; color: white; white-space: nowrap; } #navigation li { list-style-type: none; display: inline; margin: 0px; padding-right: 40px; } #navigation li a { text-decoration: none; color: white; } #navigation li a:link { text-decoration: none; color: white; } #navigation li a:visited { text-decoration: none; color: white; } #navigation li a:hover { text-decoration: none; color: #99cc00; }


