Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var hashIO = {
- url : '/content',
- on : {
- success : function (){},
- error : function(){}
- }
- };
- YUI().use('node','event-mouseenter','io',function(Y){
- var curHash = '';
- var hash = '';
- function hashUpdate(){
- hash = location.hash.substring(1);
- if(curHash != hash)
- {
- curHash = hash;
- loadNewHash();
- }
- }
- function loadComplete(id, o, args){
- try{
- var page = o.responseText;
- }catch(e){
- Y.log(e);
- }
- }
- function loadNewHash()
- {
- var uri = hashIO.url + hash + '.php';
- hashIO.on.success = Y.bind(loadComplete, this);
- request = Y.io(uri, hashIO);
- }
- setInterval(hashUpdate,20);
- });
Add Comment
Please, Sign In to add comment