PHP Classes

File: web/assets/plugins/revolution_slider/documentation/assets/js/scripts.js

Recommend this page to a friend!
  Classes of Felix Ivan Romero Rodríguez   PHP Web Socket Chat   web/assets/plugins/revolution_slider/documentation/assets/js/scripts.js   Download  
File: web/assets/plugins/revolution_slider/documentation/assets/js/scripts.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Web Socket Chat
Chat system using Websockets or AJAX requests
Author: By
Last change:
Date: 7 years ago
Size: 1,803 bytes
 

Contents

Class file image Download
/*! * Documenter 2.0 * http://rxa.li/documenter * * Copyright 2011, Xaver Birsak * http://revaxarts.com * */ !function ($) { $(function(){ var hash = location.hash || null, win = $(window), scrolloffset = $('div.navbar').height()+40, iDeviceNotOS4 = (navigator.userAgent.match(/iphone|ipod|ipad/i) && !navigator.userAgent.match(/OS 5/i)) || false, badIE = $('html').prop('class').match(/ie(6|7|8)/)|| false; duration = parseInt(duration,10); $('.dropdown-toggle').dropdown(); $('.navbar').scrollspy(); $(".collapse").collapse(); //handle external links (new window) $('a[href^=http]').bind('click',function(){ window.open($(this).attr('href')); return false; }); //IE 8 and lower doesn't like the smooth pagescroll if(!badIE){ window.scroll(0,0); $('a[href^=#]').bind('click touchstart',function(){ hash = $(this).attr('href'); $.scrollTo.window().queue([]).stop(); goTo(hash, true); return false; }); //if a hash is set => go to it if(hash){ setTimeout(function(){ goTo(hash); },500); } } $('.brand').on('click', function(){ goTo('#container', false); }); //the function is called when the hash changes function hashchange(){ goTo(location.hash, false); } //scroll to a section and set the hash function goTo(hash,changehash){ win.unbind('hashchange', hashchange); hash = hash.replace(/!\//,''); win.stop().scrollTo(hash,duration,{ offset:-scrolloffset, easing:easing, axis:'y' }); if(changehash !== false){ var l = location; location.href = (l.protocol+'//'+l.host+l.pathname+'#!/'+hash.substr(1)); location.hash = hash.substr(1); } win.bind('hashchange', hashchange); } // make code pretty window.prettyPrint && prettyPrint(); }) }(window.jQuery)