You can use this . perfect and easily
#media{
background-color:#000;
color:#fff;
float:left;
width:640px;
height:400px;
}
#button_container{
float:left;
}
.media_item{
padding:15px;
border:1px solid #aaa;
background-color:#ccc;
cursor:pointer;
width:200px;
margin:4px 0px 0px 4px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
}
Some Default Content Should Be Here
function update_source(src){
document.getElementById('media').innerHTML = '
'+src+' Loaded
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
';}
var container = document.getElementById('button_container');
var buttons = container.getElementsByTagName('div');
for(var i = 0; i < buttons.length; i++){
buttons[i].setAttribute('onclick', 'update_source(this.id)');
}
2013-09-14 07:18:38
user2731816