To get rid of the ‘/category/’ in your wordpress peramlink url, download the following plugin:
A Log of Coding Solutions
by Webhead
To get rid of the ‘/category/’ in your wordpress peramlink url, download the following plugin:
by Webhead
I know to pass a parameter to a setTimeout function you would use javascript’s “closure” to get it to work:
setTimeout(function(){alert(someParameter)}, 1000);
However if you are setting someParameter in a loop, setTimeout will always alert the last value set to someParameter.
The solution is to set a scope around setTimeout like so:
var strings = [ "hello", "world" ]; var delay = 1000; for(var i=0;i<strings.length;i++) { (function(s){ setTimeout( function(){alert(s);}, delay); })(strings[i]); delay += 1000; }
source: http://stackoverflow.com/questions/6425062/passing-functions-to-settimeout-in-a-loop-always-the-last-value
by Webhead
A collection of opacity syntax for multiple browsers.
.img_transparent_class { /* IE 8 */ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; /* IE 5-7 */ filter: alpha(opacity=50); /* Netscape */ -moz-opacity: 0.5; /* Safari 1.x */ -khtml-opacity: 0.5; /* Good browsers */ opacity: 0.5; }
keywords: css opacity all browsers source: http://www.naveenos.com/2011/07/css-opacity-in-all-browsers.html
by Webhead
Found a great article that demonstrates vertically centering multiline text. It uses display:table and display:table-cell among some IE hacks.
Found a better post on stack overflow that does this. The idea is to have an outer div with a specific height and the same line height. Then a span inside to define your true line height.
keywords: css vertical center text
source: http://css-tricks.com/vertically-center-multi-lined-text/source: http://stackoverflow.com/a/14850381
by Webhead
I am replacing a two-column table where the first column is on the left with a width about 90% and the 2nd column is on the right with a width of 10%. The following HTML does not work as the span width only is as wide as the text. When I use floats on the spans, it takes the span elements out of the layout so that the li collapses as if there’s nothing in it.
<ul>
<li><span>left</span><span>right</span></li>
</ul>
Turns out I need to set the display attribute to inline-block for the span elements. Now the width works as expected.
keywords: css width no effect
source: http://csscreator.com/node/28049
by Webhead
In mac os x terminal (linux) you can navigate to the desired directory and run the following command to remove any specific file or folder.
find . -name CVS -exec rm -rf {} \;
Basically a “find” command can be concatenated with other commands so the same operation can be applied recursively to all the found results.
keywords: terminal remove all cvs folders
source: http://www.phinesolutions.com/remove-the-cvs-folders.html