Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $(document).ready(function() {
- $("#event_menu").hide();
- $("#about_menu").hide();
- $("#menu a#event").click(function() {
- $("#about_menu").slideUp('slow', function () {
- $("#event_menu").slideToggle('slow');
- });
- });
- $("#menu a#about").click(function() {
- $("#event_menu").slideUp('slow', function () {
- $("#about_menu").slideToggle('slow');
- });
- });
- // Check for hash value in URL
- var hash = window.location.hash.substr(1);
- var href = $('.submenu li a').each(function(){
- var href = $(this).attr('href');
- if(hash==href.substr(0,href.length-5)){
- var toLoad = hash+'.html #content';
- $('#content').load(toLoad);
- }
- });
- $('.submenu li a').click(function(){
- var toLoad = $(this).attr('href')+' #content';
- $('#content').slideUp('fast',loadContent);
- window.location.hash = $(this).attr('href').substr(0,$(this).attr('href').length-5);
- function loadContent() {
- $('#content').load(toLoad,function(){
- $('#content').slideDown('normal');
- });
- }
- return false;
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement