Any idea? Im not too good with code. Code works fine when I just put the code in jquery.js (yeah i know its javascript), right before </body>. Thank you.
jquery.jsCode:<head> <link rel='stylesheet' media='screen and (max-device-width: 640px)' href='jquery.js'> </head>
Code:function myFunction() { var container = document.getElementById('container'), divs = container.getElementsByTagName('div'), tmpdiv = document.createElement('div'), order = [3, 2, 1]; for (var i = 0; i < order.length; i++) { tmpdiv.appendChild(document.getElementById('div' + [order[i]])); } container.parentNode.replaceChild(tmpdiv, container); } window.onload = myFunction();



Reply With Quote

Bookmarks