Check out my twitter script by CMXads
Goth and Gore Gifts Shop right now or else! | Till death do us part Axels New Music releases | Evil gear Christmas is almost here | PHP Gallery PHP Gallery is a free php image script. |
here are some of the best and useful php scripts and snippets to help in your projects. Php displayed below. Use the search for specific script lookups. Click the category links to view scripts in Javascript and cgi. To add your own script click the link and add your useful script example.
equal column height javascript function maintain equal colomn height
column equal height
var equalcolumns=new Object()
//Input IDs (id attr) of columns to equalize. Script will check if each corresponding column actually exists:
equalcolumns.columnswatch=["navbar", "content"]
equalcolumns.setHeights=function(reset){
var tallest=0
var resetit=(typeof reset=="string")? true : false
for (var i=0; i<this.columnswatch.length; i++){
if (document.getElementById(this.columnswatch[i])!=null){
if (resetit)
document.getElementById(this.columnswatch[i]).style.height="auto"
if (document.getElementById(this.columnswatch[i]).offsetHeight>tallest)
tallest=document.getElementById(this.columnswatch[i]).offsetHeight
}
}
if (tallest>0){
for (var i=0; i<this.columnswatch.length; i++){
if (document.getElementById(this.columnswatch[i])!=null)
document.getElementById(this.columnswatch[i]).style.height=tallest+"px"
}
}
}
equalcolumns.resetHeights=function(){
this.setHeights("reset")
}
equalcolumns.dotask=function(target, functionref, tasktype){ //assign a function to execute to an event handler (ie: onunload)
var tasktype=(window.addEventListener)? tasktype : "on"+tasktype
if (target.addEventListener)
target.addEventListener(tasktype, functionref, false)
else if (target.attachEvent)
target.attachEvent(tasktype, functionref)
}
equalcolumns.dotask(window, function(){equalcolumns.setHeights()}, "load")
equalcolumns.dotask(window, function(){if (typeof equalcolumns.timer!="undefined") clearTimeout(equalcolumns.timer); equalcolumns.timer=setTimeout("equalcolumns.resetHeights()", 200)}, "resize")