Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- //
- function resizebutton(div)
- {
- if (div == 'leftpanel'){
- #this code shrinks the other divs, it should run first, without any other divs being enlarged
- document.getElementById('middlepanel').style.width = '20%';
- document.getElementById('rightpanel').style.width = '20%';
- }
- if (div == 'middlepanel'){
- document.getElementById('leftpanel').style.width = '20%';
- document.getElementById('rightpanel').style.width = '20%';
- }
- if (div == 'rightpanel'){
- document.getElementById('leftpanel').style.width = '20%';
- document.getElementById('middlepanel').style.width = '20%';
- }
- }
- function resizeMeFirst(div, callback) {
- document.getElementById(div).style.width = '50%';
- //ok, now that that is done, run the callback function.
- callback(div)
- }
- resizeMeFirst(div, resizebutton);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement