2320 shaares
247 results
tagged
javascript
Smart Wizard
// Shuffles elements in a list
// By - Yair Even Or
var ul = document.querySelector("ul"), // get the list
temp = ul.cloneNode(true); // clone the list
// shuffle the cloned list (better performance)
for (var i = temp.children.length + 1; i--; )
temp.appendChild( temp.children[Math.random() * i |0] );
ul.parentNode.replaceChild(temp, ul); // copy shuffled back to 'ul'
] load content in html
$("#contentArea").load("rpc.php?o="+id+"");
] load content in variable
function doSomethingWithData(data) { alert(data);}
$.get('rpc.php?o=' + id, doSomethingWithData);
Redirect index page requests to either root or directory
RewriteCond %{THE_REQUEST} ^.\/index.\ HTTP/
RewriteRule ^(.)index.$ "/$1" [R=301,L]
3D ROTATION